Club System

This commit is contained in:
2026-06-02 20:54:10 +02:00
parent c68c4d18b5
commit 0b18d289ef
38 changed files with 1464 additions and 118 deletions

View File

@@ -168,10 +168,29 @@
</div>
</div>
@if($isEdit)
<x-form-group-title label="Entry Management" icon="wrench" />
@can('moderate',$entry)
<div class="form-group grid-c2">
<div>
<x-form-field-title name="Staff comment" />
<textarea class="form-textarea" name="staff_comment" rows="3">{{ old('staff_comment', $entry->staff_comment ?? '' ) }}</textarea>
</div>
<div>
<x-form-field-title name="Owner" required="true" />
<livewire:xf-user-selector :initial-user-id="$entry->user_id" />
</div>
</div>
@endcan
@cannot('moderate', $entry)
@endcannot
@endif
@csrf
<div class="submit">
<x-submit-entry-status :section="$section" />
<x-submit-entry-status :section="$section" :is-edit="$isEdit" :current-state="$entry->state ?? null" :entry="$entry" />
<button id="submit-button" type="submit" class="btn primary" style="padding:1%;">Submit</button>
</div>
</form>

View File

@@ -39,12 +39,18 @@
<template x-if="!file.done && !file.error">
<i data-lucide="loader-2" class="spin"></i>
</template>
<template x-if="file.done">
<i data-lucide="check-circle"></i>
</template>
<template x-if="file.error">
<i data-lucide="alert-circle"></i>
</template>
<template x-if="file.done && file.state === 'public'">
<i data-lucide="eye" class="file-state-icon file-state-icon--public"></i>
</template>
<template x-if="file.done && file.state === 'private'">
<i data-lucide="eye-off" class="file-state-icon file-state-icon--private"></i>
</template>
<template x-if="file.done && file.state === 'archived'">
<i data-lucide="archive" class="file-state-icon file-state-icon--archived"></i>
</template>
<div class="upload-item-info">
<span class="upload-item-name" x-text="file.name"></span>
@@ -55,6 +61,48 @@
</div>
<span class="upload-item-error" x-show="file.error" x-text="file.error"></span>
</div>
@if($isEdit)
<div class="upload-item-state" x-show="file.done" x-data="{ confirmArchive: false }">
<select class="form-select" :disabled="file.state === 'archived'" @change="
if( $event.target.value === 'archived'){
confirmArchive = true;
$event.target.value = file.state;
} else {
$wire ? $wire.dispatch('fileStateChanged') : null;
changeFileState(i, $event.target.value);
}
" :value="file.state">
<option value="public" :selected="file.state === 'public'">Public</option>
<option value="private" :selected="file.state === 'private'">Private</option>
<option value="archived" :selected="file.state === 'archived'">Archived</option>
</select>
<div class="modal-overlay" x-cloak x-show="confirmArchive" x-transition.opacity.duration.300ms @click.self="confirmArchive = false" @keydown.escape.window="confirmArchive = false">
<div class="modal-window" x-show="confirmArchive" x-transition>
<div class="modal-header">
<span class="modal-title">
<i data-lucide="archive" size="16"></i>
Archive file
</span>
<button type="button" class="modal-close" @click="confirmArchive = false">
<i data-lucide="x" size="20"></i>
</button>
</div>
<div class="modal-body">
<p>Archiving a file is <b>irreversible</b>.</p>
<div class="queue-mod-actions" style="margin-top: 15px">
<button type="button" class="btn" @click="confirmArchive = false">
Cancel
</button>
<button type="button" class="btn danger" @click="changeFileState(i,'archived'); confirmArchive = false;">
<i data-lucide="archive" size="14"></i>
Confirm archive
</button>
</div>
</div>
</div>
</div>
</div>
@endif
<div class="upload-item-actions">
<button type="button" class="btn" x-show="file.error" @click="handleRetryFile(i)">
<i data-lucide="refresh-cw"></i>
@@ -64,6 +112,9 @@
</button>
</div>
<input type="hidden" name="files_uuid[]" :value="file.uuid" x-show="file.done">
@if($isEdit)
<input type="hidden" name="files_state[]" :value="file.state" x-show="file.done">
@endif
</div>
</template>
</div>