Compare commits

..

No commits in common. "22157b5d508b5b47d15cabbaae1b567a1d10c1f1" and "d7cc80afe92bca19ecafd2d4642d337dbd97e42b" have entirely different histories.

7 changed files with 26 additions and 51 deletions

View File

@ -2,12 +2,12 @@ FROM php:8.1.6-fpm as php
WORKDIR /app WORKDIR /app
RUN ls /app RUN ls /app
RUN apt-get update RUN apt-get update
RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip poppler-utils libpng-dev libjpeg-dev default-mysql-client libzip-dev RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip poppler-utils libpng-dev libjpeg-dev default-mysql-client
RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra texlive-extra-utils RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra texlive-extra-utils
RUN docker-php-ext-install pdo_mysql curl exif intl mbstring pcntl zip RUN docker-php-ext-install pdo_mysql curl gd exif intl mbstring pcntl
RUN pecl install redis && docker-php-ext-enable redis RUN pecl install redis && docker-php-ext-enable redis
RUN docker-php-ext-configure gd --with-jpeg RUN docker-php-ext-configure gd --with-jpeg
RUN docker-php-ext-install gd RUN docker-php-ext-enable gd
RUN usermod -s /bin/bash www-data RUN usermod -s /bin/bash www-data
RUN echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini RUN echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini

View File

@ -25,7 +25,7 @@ class FormUpdateMetaAction
'sorting.0' => 'required|string', 'sorting.0' => 'required|string',
'sorting.1' => 'required|string|in:asc,desc', 'sorting.1' => 'required|string|in:asc,desc',
'active_columns' => 'array', 'active_columns' => 'array',
'active_columns.*' => ['string', Rule::in([...$form->getFields()->pluck('key')->toArray(), 'created_at', 'prevention'])] 'active_columns.*' => ['string', Rule::in([...$form->getFields()->pluck('key')->toArray(), 'created_at'])]
]; ];
} }

View File

@ -163,7 +163,7 @@ class Form extends Model implements HasMedia
if (is_array(data_get($model->meta, 'active_columns'))) { if (is_array(data_get($model->meta, 'active_columns'))) {
$model->setAttribute('meta', [ $model->setAttribute('meta', [
...$model->meta, ...$model->meta,
'active_columns' => array_values(array_intersect([...$model->getFields()->pluck('key')->toArray(), 'created_at', 'prevention'], $model->meta['active_columns'])), 'active_columns' => array_values(array_intersect([...$model->getFields()->pluck('key')->toArray(), 'created_at'], $model->meta['active_columns'])),
]); ]);
return; return;
} }

View File

@ -75,11 +75,7 @@ class ParticipantResource extends JsonResource
'name' => 'Registriert am', 'name' => 'Registriert am',
'id' => 'created_at', 'id' => 'created_at',
'display_attribute' => 'created_at_display' 'display_attribute' => 'created_at_display'
])->push([ ])
'name' => 'Prävention',
'id' => 'prevention',
'display_attribute' => 'prevention_display'
]),
]; ];
} }
} }

View File

@ -9,8 +9,7 @@
> >
<ui-sprite class="w-3 h-3" :src="active ? 'close' : 'plus'"></ui-sprite> <ui-sprite class="w-3 h-3" :src="active ? 'close' : 'plus'"></ui-sprite>
</a> </a>
<span v-if="text" v-text="text"></span> <span v-text="text"></span>
<slot></slot>
</div> </div>
</template> </template>
@ -25,9 +24,8 @@ const levelMap = {
const props = defineProps({ const props = defineProps({
text: { text: {
required: false, required: true,
type: String, type: String,
default: () => '',
}, },
value: { value: {
type: Object, type: Object,

View File

@ -79,14 +79,15 @@
<button v-if="columnindex === 0 && participant.member_id === null" v-tooltip="`kein Mitglied zugewiesen. Per Klick zuweisen`" @click.prevent="assigning = participant"> <button v-if="columnindex === 0 && participant.member_id === null" v-tooltip="`kein Mitglied zugewiesen. Per Klick zuweisen`" @click.prevent="assigning = participant">
<ui-sprite src="warning-triangle" class="text-yellow-400 w-5 h-5"></ui-sprite> <ui-sprite src="warning-triangle" class="text-yellow-400 w-5 h-5"></ui-sprite>
</button> </button>
<ui-table-toggle-button v-if="columnindex === 0 && groupParticipants" :value="participant" :level="0" :active="isOpen(participant.id)" @toggle="toggle(participant)"> <ui-table-toggle-button
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items"></prevention> v-if="columnindex === 0 && groupParticipants"
<span v-else v-text="participant[column.display_attribute]"></span> :value="participant"
</ui-table-toggle-button> :text="participant[column.display_attribute]"
<div v-else> :level="0"
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items"></prevention> :active="isOpen(participant.id)"
<span v-else v-text="participant[column.display_attribute]"></span> @toggle="toggle(participant)"
</div> ></ui-table-toggle-button>
<div v-else v-text="participant[column.display_attribute]"></div>
</div> </div>
</td> </td>
<td> <td>
@ -97,16 +98,15 @@
<template v-for="child in childrenOf(participant.id)" :key="child.id"> <template v-for="child in childrenOf(participant.id)" :key="child.id">
<tr> <tr>
<td v-for="(column, columnindex) in activeColumns" :key="column.id"> <td v-for="(column, columnindex) in activeColumns" :key="column.id">
<div class="flex items-center space-x-2"> <ui-table-toggle-button
<ui-table-toggle-button v-if="columnindex === 0 && groupParticipants" :value="child" :level="1" :active="isOpen(child.id)" @toggle="toggle(child)"> v-if="columnindex === 0 && groupParticipants"
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items"></prevention> :value="child"
<span v-else v-text="child[column.display_attribute]"></span> :text="child[column.display_attribute]"
</ui-table-toggle-button> :level="1"
<div v-else> :active="isOpen(child.id)"
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items"></prevention> @toggle="toggle(child)"
<span v-else v-text="child[column.display_attribute]"></span> ></ui-table-toggle-button>
</div> <div v-else v-text="child[column.display_attribute]"></div>
</div>
</td> </td>
<td> <td>
<a v-tooltip="`Bearbeiten`" href="#" class="ml-2 inline-flex btn btn-warning btn-sm" @click.prevent="editReal(child)"><ui-sprite src="pencil"></ui-sprite></a> <a v-tooltip="`Bearbeiten`" href="#" class="ml-2 inline-flex btn btn-warning btn-sm" @click.prevent="editReal(child)"><ui-sprite src="pencil"></ui-sprite></a>
@ -127,7 +127,6 @@ import { watch, ref, computed } from 'vue';
import { useApiIndex } from '../../composables/useApiIndex.js'; import { useApiIndex } from '../../composables/useApiIndex.js';
import useTableToggle from '../../composables/useTableToggle.js'; import useTableToggle from '../../composables/useTableToggle.js';
import MemberAssign from './MemberAssign.vue'; import MemberAssign from './MemberAssign.vue';
import Prevention from './Prevention.vue';
const deleting = ref(null); const deleting = ref(null);
const { isOpen, toggle, childrenOf, clearToggle } = useTableToggle({}); const { isOpen, toggle, childrenOf, clearToggle } = useTableToggle({});

View File

@ -1,18 +0,0 @@
<template>
<div class="flex rounded-lg overflow-hidden">
<div v-for="(prevention, index) in value" :key="index" v-tooltip="prevention.tooltip" class="py-1 px-2 text-xs" :class="classes(prevention)" v-text="prevention.letter"></div>
</div>
</template>
<script setup>
const props = defineProps({
value: {
required: true,
type: Object,
},
});
function classes(prevention) {
return prevention.value ? 'bg-green-800 text-green-200' : 'bg-neutral-700 text-neutral-200';
}
</script>