Compare commits
84 Commits
yearly_pre
...
master
Author | SHA1 | Date |
---|---|---|
|
146b7dd6e3 | |
|
dafda4883d | |
|
e6526ee326 | |
|
44e8da9a37 | |
|
4e43609619 | |
|
32246e534e | |
|
4b50c85fd6 | |
|
e5ecd0a2c0 | |
|
e06f924304 | |
|
6463997f8f | |
|
247a89ae77 | |
|
6c3c8b5703 | |
|
5fe1004871 | |
|
4f9bfa0f75 | |
|
a27e86ffcc | |
|
c8e268d91b | |
|
10b71f7a36 | |
|
144af1bf71 | |
|
17808c6eb1 | |
|
427f45373e | |
|
a1981c7dec | |
|
4497084ae6 | |
|
f2090aa9d0 | |
|
6b7de1446f | |
|
f8d2be9df5 | |
|
722237f486 | |
|
51af9d427e | |
|
b0fd584397 | |
|
aab004f1f1 | |
|
79d92a6567 | |
|
a136085d2b | |
|
67fe88c9b4 | |
|
36932f8417 | |
|
3f92a48f29 | |
|
e396714d31 | |
|
af13bb1cde | |
|
bd86e65c8c | |
|
8ea566c400 | |
|
d74fcab024 | |
|
392a34b5c7 | |
|
04ddcdb0d5 | |
|
bfdb591baf | |
|
890201817f | |
|
5a2707ccac | |
|
b2153e647d | |
|
392e385682 | |
|
88bb1091a9 | |
|
e2d489d83f | |
|
dce7c26b7e | |
|
4b38296687 | |
|
634a13b4dd | |
|
0bb1d2b309 | |
|
d0bd5bb0de | |
|
b86fe9634f | |
|
752a5d7c29 | |
|
9f0516ad55 | |
|
2e1df9791d | |
|
ce976c1108 | |
|
4d25f5e56d | |
|
21cebfc04a | |
|
d53a6d23d2 | |
|
ccef61352d | |
|
5be7987d80 | |
|
ac592920e7 | |
|
68651b6c16 | |
|
cff62ebc1d | |
|
c3ecb9dc63 | |
|
ab442dff9b | |
|
88e020ac4e | |
|
d7361b6713 | |
|
4538ec8ca8 | |
|
6032b9c289 | |
|
6da6453b5d | |
|
66b6a549c3 | |
|
878de3f566 | |
|
aa55b56df7 | |
|
31c582e81d | |
|
adf9341dd7 | |
|
9853d4e82e | |
|
4698c808f8 | |
|
ea2eb08052 | |
|
09f401055a | |
|
2c786b62ce | |
|
4cd18e9b3c |
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -1,5 +1,35 @@
|
||||||
# Letzte Änderungen
|
# Letzte Änderungen
|
||||||
|
|
||||||
|
### 1.12.19
|
||||||
|
|
||||||
|
- Zuschusslisten können nun aus Veranstaltungs-Daten erstellt werden
|
||||||
|
- Veranstaltungs-Übersicht zeigt nun Tags an
|
||||||
|
|
||||||
|
### 1.12.18
|
||||||
|
|
||||||
|
- Fix: Initialisierung klappt nun auch, wenn Mitgliedsnummer mit einer 0 beginnt
|
||||||
|
|
||||||
|
### 1.12.17
|
||||||
|
|
||||||
|
- Fix: Mitgliedschaften werden beim Sammel-Speichern nicht mehr doppelt angelegt
|
||||||
|
|
||||||
|
### 1.12.16
|
||||||
|
|
||||||
|
- Mitgliedschaften können nun bei Mitgliedschaften-Übersicht gelöscht werden
|
||||||
|
|
||||||
|
### 1.12.15
|
||||||
|
|
||||||
|
- Bestätigung wird eingeblendet beim Kopieren eines Events
|
||||||
|
|
||||||
|
### 1.12.14
|
||||||
|
|
||||||
|
- Bilder werden nun mitkopiert beim Kopieren eines Events
|
||||||
|
|
||||||
|
### 1.12.13
|
||||||
|
|
||||||
|
- Kopieren von bestehenden Veranstaltungen
|
||||||
|
- Präventions-Erinnerung automatisch versenden
|
||||||
|
|
||||||
### 1.12.11
|
### 1.12.11
|
||||||
|
|
||||||
- Fix: Bank Account mit abrufen wenn Mitglied editiert wird
|
- Fix: Bank Account mit abrufen wenn Mitglied editiert wird
|
||||||
|
|
|
@ -54,6 +54,7 @@ class ActivityResource extends JsonResource
|
||||||
'index' => route('activity.index'),
|
'index' => route('activity.index'),
|
||||||
'create' => route('activity.create'),
|
'create' => route('activity.create'),
|
||||||
'membership_masslist' => route('membership.masslist.index'),
|
'membership_masslist' => route('membership.masslist.index'),
|
||||||
|
'membership_index' => route('membership.index'),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace App\Contribution\Actions;
|
namespace App\Contribution\Actions;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\ContributionFactory;
|
use App\Contribution\ContributionFactory;
|
||||||
use App\Contribution\Documents\ContributionDocument;
|
use App\Contribution\Requests\GenerateRequest;
|
||||||
use App\Rules\JsonBase64Rule;
|
use App\Rules\JsonBase64Rule;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
use Zoomyboy\Tex\BaseCompiler;
|
use Zoomyboy\Tex\BaseCompiler;
|
||||||
use Zoomyboy\Tex\Tex;
|
use Zoomyboy\Tex\Tex;
|
||||||
|
@ -15,23 +15,19 @@ class GenerateAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
/**
|
public function handle(HasContributionData $request): BaseCompiler
|
||||||
* @param class-string<ContributionDocument> $document
|
|
||||||
* @param array<string, mixed> $payload
|
|
||||||
*/
|
|
||||||
public function handle(string $document, array $payload): BaseCompiler
|
|
||||||
{
|
{
|
||||||
return Tex::compile($document::fromRequest($payload));
|
return Tex::compile($request->type()::fromPayload($request));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function asController(ActionRequest $request): BaseCompiler
|
public function asController(GenerateRequest $request): BaseCompiler|JsonResponse
|
||||||
{
|
{
|
||||||
$payload = $this->payload($request);
|
app(ContributionFactory::class)->validateType($request);
|
||||||
$type = data_get($payload, 'type');
|
$request->validateContribution();
|
||||||
ValidateAction::validateType($type);
|
|
||||||
Validator::make($payload, app(ContributionFactory::class)->rules($type))->validate();
|
|
||||||
|
|
||||||
return $this->handle($type, $payload);
|
return $request->input('validate')
|
||||||
|
? response()->json([])
|
||||||
|
: $this->handle($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,12 +39,4 @@ class GenerateAction
|
||||||
'payload' => [new JsonBase64Rule()],
|
'payload' => [new JsonBase64Rule()],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, string>
|
|
||||||
*/
|
|
||||||
private function payload(ActionRequest $request): array
|
|
||||||
{
|
|
||||||
return json_decode(rawurldecode(base64_decode($request->input('payload', ''))), true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
namespace App\Contribution\Actions;
|
namespace App\Contribution\Actions;
|
||||||
|
|
||||||
use App\Contribution\Documents\ContributionDocument;
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
use App\Contribution\ContributionFactory;
|
||||||
|
use App\Contribution\Requests\GenerateApiRequest;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
use Zoomyboy\Tex\BaseCompiler;
|
use Zoomyboy\Tex\BaseCompiler;
|
||||||
use Zoomyboy\Tex\Tex;
|
use Zoomyboy\Tex\Tex;
|
||||||
|
@ -13,26 +14,17 @@ class GenerateApiAction
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param class-string<ContributionDocument> $document
|
* @todo merge this with GenerateAction
|
||||||
* @param array<string, mixed> $payload
|
|
||||||
*/
|
*/
|
||||||
public function handle(string $document, array $payload): BaseCompiler
|
public function handle(HasContributionData $request): BaseCompiler
|
||||||
{
|
{
|
||||||
return Tex::compile($document::fromApiRequest($payload));
|
return Tex::compile($request->type()::fromPayload($request));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function asController(ActionRequest $request): BaseCompiler
|
public function asController(GenerateApiRequest $request): BaseCompiler
|
||||||
{
|
{
|
||||||
ValidateAction::validateType($request->input('type'));
|
app(ContributionFactory::class)->validateType($request);
|
||||||
|
|
||||||
return $this->handle($request->input('type'), $request->input());
|
return $this->handle($request);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function rules(): array
|
|
||||||
{
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Contribution\Actions;
|
|
||||||
|
|
||||||
use App\Contribution\ContributionFactory;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
|
||||||
|
|
||||||
class ValidateAction
|
|
||||||
{
|
|
||||||
use AsAction;
|
|
||||||
|
|
||||||
public function asController(): JsonResponse
|
|
||||||
{
|
|
||||||
return response()->json(['valid' => true]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function rules(): array
|
|
||||||
{
|
|
||||||
return app(ContributionFactory::class)->rules(request()->type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function prepareForValidation(ActionRequest $request): void
|
|
||||||
{
|
|
||||||
static::validateType($request->input('type'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function validateType(?string $type = null): void
|
|
||||||
{
|
|
||||||
Validator::make(['type' => $type], app(ContributionFactory::class)->typeRule())->validate();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Contribution\Contracts;
|
||||||
|
|
||||||
|
use App\Contribution\Data\MemberData;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use App\Contribution\Documents\ContributionDocument;
|
||||||
|
use App\Country;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
interface HasContributionData {
|
||||||
|
|
||||||
|
public function dateFrom(): Carbon;
|
||||||
|
public function dateUntil(): Carbon;
|
||||||
|
public function zipLocation(): string;
|
||||||
|
public function eventName(): string;
|
||||||
|
/**
|
||||||
|
* @return class-string<ContributionDocument>
|
||||||
|
*/
|
||||||
|
public function type(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, MemberData>
|
||||||
|
*/
|
||||||
|
public function members(): Collection;
|
||||||
|
|
||||||
|
public function country(): ?Country;
|
||||||
|
|
||||||
|
public function validateContribution(): void;
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Contribution;
|
namespace App\Contribution;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Documents\BdkjHesse;
|
use App\Contribution\Documents\BdkjHesse;
|
||||||
use App\Contribution\Documents\ContributionDocument;
|
use App\Contribution\Documents\ContributionDocument;
|
||||||
use App\Contribution\Documents\RdpNrwDocument;
|
use App\Contribution\Documents\RdpNrwDocument;
|
||||||
|
@ -10,6 +11,7 @@ use App\Contribution\Documents\CitySolingenDocument;
|
||||||
use App\Contribution\Documents\CityFrankfurtMainDocument;
|
use App\Contribution\Documents\CityFrankfurtMainDocument;
|
||||||
use App\Contribution\Documents\WuppertalDocument;
|
use App\Contribution\Documents\WuppertalDocument;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
class ContributionFactory
|
class ContributionFactory
|
||||||
|
@ -27,13 +29,13 @@ class ContributionFactory
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection<int, array{title: string, class: class-string<ContributionDocument>}>
|
* @return Collection<int, array{name: string, id: class-string<ContributionDocument>}>
|
||||||
*/
|
*/
|
||||||
public function compilerSelect(): Collection
|
public function compilerSelect(): Collection
|
||||||
{
|
{
|
||||||
return collect($this->documents)->map(fn ($document) => [
|
return collect($this->documents)->map(fn ($document) => [
|
||||||
'title' => $document::buttonName(),
|
'name' => $document::getName(),
|
||||||
'class' => $document,
|
'id' => $document,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,4 +61,9 @@ class ContributionFactory
|
||||||
...$type::rules(),
|
...$type::rules(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function validateType(HasContributionData $request): void {
|
||||||
|
Validator::make(['type' => $request->type()], $this->typeRule())->validate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class MemberData extends Data
|
||||||
return collect($data)->map(fn ($member) => self::factory()->withoutMagicalCreation()->from([
|
return collect($data)->map(fn ($member) => self::factory()->withoutMagicalCreation()->from([
|
||||||
...$member,
|
...$member,
|
||||||
'birthday' => Carbon::parse($member['birthday'])->toAtomString(),
|
'birthday' => Carbon::parse($member['birthday'])->toAtomString(),
|
||||||
'gender' => Gender::fromString($member['gender']),
|
'gender' => $member['gender'] ? Gender::fromString($member['gender']) : null,
|
||||||
'isLeader' => $member['is_leader'],
|
'isLeader' => $member['is_leader'],
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Data\MemberData;
|
||||||
use App\Contribution\Traits\HasPdfBackground;
|
use App\Contribution\Traits\HasPdfBackground;
|
||||||
use App\Country;
|
use App\Country;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
@ -17,8 +19,8 @@ class BdkjHesse extends ContributionDocument
|
||||||
* @param Collection<int, Collection<int, MemberData>> $members
|
* @param Collection<int, Collection<int, MemberData>> $members
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public ?Country $country,
|
public ?Country $country,
|
||||||
public Collection $members,
|
public Collection $members,
|
||||||
|
@ -39,33 +41,15 @@ class BdkjHesse extends ContributionDocument
|
||||||
return Carbon::parse($this->dateUntil)->format('d.m.Y');
|
return Carbon::parse($this->dateUntil)->format('d.m.Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function fromPayload(HasContributionData $request): self
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromRequest(array $request): self
|
|
||||||
{
|
{
|
||||||
return new self(
|
return new self(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
country: $request->country(),
|
||||||
members: MemberData::fromModels($request['members'])->chunk(20),
|
members: $request->members()->chunk(20),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): self
|
|
||||||
{
|
|
||||||
return new self(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
|
||||||
members: MemberData::fromApi($request['member_data'])->chunk(20),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,4 +117,15 @@ class BdkjHesse extends ContributionDocument
|
||||||
'zipLocation' => 'required|string',
|
'zipLocation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
SpecialType::GENDER,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,15 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Data\MemberData;
|
||||||
use App\Contribution\Traits\FormatsDates;
|
use App\Contribution\Traits\FormatsDates;
|
||||||
use App\Contribution\Traits\HasPdfBackground;
|
use App\Contribution\Traits\HasPdfBackground;
|
||||||
use App\Country;
|
use App\Country;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use App\Invoice\InvoiceSettings;
|
use App\Invoice\InvoiceSettings;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class CityFrankfurtMainDocument extends ContributionDocument
|
class CityFrankfurtMainDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
|
@ -20,8 +23,8 @@ class CityFrankfurtMainDocument extends ContributionDocument
|
||||||
* @param Collection<int, Collection<int, MemberData>> $members
|
* @param Collection<int, Collection<int, MemberData>> $members
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public ?Country $country,
|
public ?Country $country,
|
||||||
public Collection $members,
|
public Collection $members,
|
||||||
|
@ -33,33 +36,15 @@ class CityFrankfurtMainDocument extends ContributionDocument
|
||||||
$this->fromName = app(InvoiceSettings::class)->from_long;
|
$this->fromName = app(InvoiceSettings::class)->from_long;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function fromPayload(HasContributionData $request): self
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromRequest(array $request): self
|
|
||||||
{
|
{
|
||||||
return new self(
|
return new self(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
country: $request->country(),
|
||||||
members: MemberData::fromModels($request['members'])->chunk(15),
|
members: $request->members()->chunk(15),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): self
|
|
||||||
{
|
|
||||||
return new self(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
|
||||||
members: MemberData::fromApi($request['member_data'])->chunk(15),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,4 +75,15 @@ class CityFrankfurtMainDocument extends ContributionDocument
|
||||||
'zipLocation' => 'required|string',
|
'zipLocation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
SpecialType::ADDRESS,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Traits\FormatsDates;
|
use App\Contribution\Traits\FormatsDates;
|
||||||
use App\Contribution\Traits\HasPdfBackground;
|
use App\Contribution\Traits\HasPdfBackground;
|
||||||
use App\Country;
|
use App\Country;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use App\Member\Member;
|
use App\Member\Member;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class CityRemscheidDocument extends ContributionDocument
|
class CityRemscheidDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
|
@ -19,8 +21,8 @@ class CityRemscheidDocument extends ContributionDocument
|
||||||
* @param Collection<int, Collection<int, Member>> $children
|
* @param Collection<int, Collection<int, Member>> $children
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public ?Country $country,
|
public ?Country $country,
|
||||||
public Collection $leaders,
|
public Collection $leaders,
|
||||||
|
@ -32,40 +34,18 @@ class CityRemscheidDocument extends ContributionDocument
|
||||||
$this->setEventName($eventName);
|
$this->setEventName($eventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function fromPayload(HasContributionData $request): self
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromRequest(array $request): self
|
|
||||||
{
|
{
|
||||||
[$leaders, $children] = MemberData::fromModels($request['members'])->partition(fn ($member) => $member->isLeader);
|
[$leaders, $children] = $request->members()->partition(fn ($member) => $member->isLeader);
|
||||||
|
|
||||||
return new self(
|
return new self(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
country: $request->country(),
|
||||||
leaders: $leaders->values()->toBase()->chunk(6),
|
leaders: $leaders->values()->toBase()->chunk(6),
|
||||||
children: $children->values()->toBase()->chunk(20),
|
children: $children->values()->toBase()->chunk(20),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): self
|
|
||||||
{
|
|
||||||
$members = MemberData::fromApi($request['member_data']);
|
|
||||||
[$leaders, $children] = $members->partition(fn ($member) => $member->isLeader);
|
|
||||||
|
|
||||||
return new self(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
|
||||||
leaders: $leaders->values()->toBase()->chunk(6),
|
|
||||||
children: $children->values()->toBase()->chunk(20),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,4 +66,15 @@ class CityRemscheidDocument extends ContributionDocument
|
||||||
'country' => 'required|integer|exists:countries,id',
|
'country' => 'required|integer|exists:countries,id',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::ADDRESS,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Data\MemberData;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use App\Invoice\InvoiceSettings;
|
use App\Invoice\InvoiceSettings;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
@ -16,8 +18,8 @@ class CitySolingenDocument extends ContributionDocument
|
||||||
* @param Collection<int, MemberData> $members
|
* @param Collection<int, MemberData> $members
|
||||||
*/
|
*/
|
||||||
final private function __construct(
|
final private function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public Collection $members,
|
public Collection $members,
|
||||||
public string $eventName,
|
public string $eventName,
|
||||||
|
@ -30,28 +32,14 @@ class CitySolingenDocument extends ContributionDocument
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public static function fromRequest(array $request): static
|
public static function fromPayload(HasContributionData $request): static
|
||||||
{
|
{
|
||||||
return new static(
|
return new static(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
members: MemberData::fromModels($request['members']),
|
members: $request->members(),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): static
|
|
||||||
{
|
|
||||||
return new static(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
members: MemberData::fromApi($request['member_data']),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +63,6 @@ class CitySolingenDocument extends ContributionDocument
|
||||||
|
|
||||||
public function checkboxes(): string
|
public function checkboxes(): string
|
||||||
{
|
{
|
||||||
$output = '';
|
|
||||||
|
|
||||||
$firstRow = collect(['B' => 'Jugendbildungsmaßnahme', 'G' => 'Gruppenleiter/innenschulung', 'FK' => 'Ferienkolonie', 'F' => 'Freizeitnaßnahme'])->map(function ($item, $key) {
|
$firstRow = collect(['B' => 'Jugendbildungsmaßnahme', 'G' => 'Gruppenleiter/innenschulung', 'FK' => 'Ferienkolonie', 'F' => 'Freizeitnaßnahme'])->map(function ($item, $key) {
|
||||||
return ($this->type === $key ? '\\checkedcheckbox' : '\\checkbox') . '{' . $item . '}';
|
return ($this->type === $key ? '\\checkedcheckbox' : '\\checkbox') . '{' . $item . '}';
|
||||||
})->implode(' & ') . ' \\\\';
|
})->implode(' & ') . ' \\\\';
|
||||||
|
@ -109,4 +95,15 @@ class CitySolingenDocument extends ContributionDocument
|
||||||
'zipLocation' => 'required|string',
|
'zipLocation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
SpecialType::ADDRESS,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use Zoomyboy\Tex\Document;
|
use Zoomyboy\Tex\Document;
|
||||||
use Zoomyboy\Tex\Template;
|
use Zoomyboy\Tex\Template;
|
||||||
|
|
||||||
|
@ -11,15 +13,12 @@ abstract class ContributionDocument extends Document
|
||||||
|
|
||||||
abstract public static function getName(): string;
|
abstract public static function getName(): string;
|
||||||
|
|
||||||
/**
|
abstract public static function fromPayload(HasContributionData $request): self;
|
||||||
* @param ContributionRequestArray $request
|
|
||||||
*/
|
|
||||||
abstract public static function fromRequest(array $request): self;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ContributionApiRequestArray $request
|
* @return array<int, SpecialType>
|
||||||
*/
|
*/
|
||||||
abstract public static function fromApiRequest(array $request): self;
|
abstract public static function requiredFormSpecialTypes(): array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
|
@ -38,11 +37,6 @@ abstract class ContributionDocument extends Document
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function buttonName(): string
|
|
||||||
{
|
|
||||||
return 'Für ' . static::getName() . ' erstellen';;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setEventName(string $eventName): void
|
public function setEventName(string $eventName): void
|
||||||
{
|
{
|
||||||
$this->eventName = $eventName;
|
$this->eventName = $eventName;
|
||||||
|
|
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Data\MemberData;
|
||||||
use App\Contribution\Traits\FormatsDates;
|
use App\Contribution\Traits\FormatsDates;
|
||||||
use App\Contribution\Traits\HasPdfBackground;
|
use App\Contribution\Traits\HasPdfBackground;
|
||||||
use App\Country;
|
use App\Country;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class RdpNrwDocument extends ContributionDocument
|
class RdpNrwDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
|
@ -17,8 +20,8 @@ class RdpNrwDocument extends ContributionDocument
|
||||||
* @param Collection<int, Collection<int, MemberData>> $members
|
* @param Collection<int, Collection<int, MemberData>> $members
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public ?Country $country,
|
public ?Country $country,
|
||||||
public Collection $members,
|
public Collection $members,
|
||||||
|
@ -29,33 +32,15 @@ class RdpNrwDocument extends ContributionDocument
|
||||||
$this->setEventName($eventName);
|
$this->setEventName($eventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function fromPayload(HasContributionData $request): self
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromRequest(array $request): self
|
|
||||||
{
|
{
|
||||||
return new self(
|
return new self(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
country: $request->country(),
|
||||||
members: MemberData::fromModels($request['members'])->chunk(17),
|
members: $request->members()->chunk(17),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): self
|
|
||||||
{
|
|
||||||
return new self(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
|
||||||
members: MemberData::fromApi($request['member_data'])->chunk(17),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,4 +66,15 @@ class RdpNrwDocument extends ContributionDocument
|
||||||
'zipLocation' => 'required|string',
|
'zipLocation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
SpecialType::GENDER,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
namespace App\Contribution\Documents;
|
namespace App\Contribution\Documents;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
use App\Contribution\Data\MemberData;
|
use App\Contribution\Data\MemberData;
|
||||||
use App\Contribution\Traits\FormatsDates;
|
use App\Contribution\Traits\FormatsDates;
|
||||||
use App\Contribution\Traits\HasPdfBackground;
|
use App\Contribution\Traits\HasPdfBackground;
|
||||||
use App\Country;
|
use App\Country;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class WuppertalDocument extends ContributionDocument
|
class WuppertalDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
|
@ -18,8 +21,8 @@ class WuppertalDocument extends ContributionDocument
|
||||||
* @param Collection<int, Collection<int, MemberData>> $members
|
* @param Collection<int, Collection<int, MemberData>> $members
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $dateFrom,
|
public Carbon $dateFrom,
|
||||||
public string $dateUntil,
|
public Carbon $dateUntil,
|
||||||
public string $zipLocation,
|
public string $zipLocation,
|
||||||
public ?Country $country,
|
public ?Country $country,
|
||||||
public Collection $members,
|
public Collection $members,
|
||||||
|
@ -30,33 +33,15 @@ class WuppertalDocument extends ContributionDocument
|
||||||
$this->setEventName($eventName);
|
$this->setEventName($eventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function fromPayload(HasContributionData $request): self
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromRequest(array $request): self
|
|
||||||
{
|
{
|
||||||
return new self(
|
return new self(
|
||||||
dateFrom: $request['dateFrom'],
|
dateFrom: $request->dateFrom(),
|
||||||
dateUntil: $request['dateUntil'],
|
dateUntil: $request->dateUntil(),
|
||||||
zipLocation: $request['zipLocation'],
|
zipLocation: $request->zipLocation(),
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
country: $request->country(),
|
||||||
members: MemberData::fromModels($request['members'])->chunk(14),
|
members: $request->members()->chunk(14),
|
||||||
eventName: $request['eventName'],
|
eventName: $request->eventName(),
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function fromApiRequest(array $request): self
|
|
||||||
{
|
|
||||||
return new self(
|
|
||||||
dateFrom: $request['dateFrom'],
|
|
||||||
dateUntil: $request['dateUntil'],
|
|
||||||
zipLocation: $request['zipLocation'],
|
|
||||||
country: Country::where('id', $request['country'])->firstOrFail(),
|
|
||||||
members: MemberData::fromApi($request['member_data'])->chunk(14),
|
|
||||||
eventName: $request['eventName'],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,4 +61,16 @@ class WuppertalDocument extends ContributionDocument
|
||||||
'zipLocation' => 'required|string',
|
'zipLocation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function requiredFormSpecialTypes(): array {
|
||||||
|
return [
|
||||||
|
SpecialType::FIRSTNAME,
|
||||||
|
SpecialType::LASTNAME,
|
||||||
|
SpecialType::ADDRESS,
|
||||||
|
SpecialType::BIRTHDAY,
|
||||||
|
SpecialType::ZIP,
|
||||||
|
SpecialType::LOCATION,
|
||||||
|
SpecialType::GENDER,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,256 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Contribution\Enums;
|
||||||
|
|
||||||
|
enum Country: string {
|
||||||
|
case AD = 'Andorra';
|
||||||
|
case AE = 'Vereinigte Arabische Emirate';
|
||||||
|
case AF = 'Afghanistan';
|
||||||
|
case AG = 'Antigua und Barbuda';
|
||||||
|
case AI = 'Anguilla';
|
||||||
|
case AL = 'Albanien';
|
||||||
|
case AM = 'Armenien';
|
||||||
|
case AN = 'Niederländische Antillen';
|
||||||
|
case AO = 'Angola';
|
||||||
|
case AQ = 'Antarktis';
|
||||||
|
case AR = 'Argentinien';
|
||||||
|
case AS = 'Amerikanisch-Samoa';
|
||||||
|
case AT = 'Österreich (Austria)';
|
||||||
|
case AU = 'Australien';
|
||||||
|
case AW = 'Aruba';
|
||||||
|
case AZ = 'Azerbaijan';
|
||||||
|
case BA = 'Bosnien-Herzegovina';
|
||||||
|
case BB = 'Barbados';
|
||||||
|
case BD = 'Bangladesh';
|
||||||
|
case BE = 'Belgien';
|
||||||
|
case BF = 'Burkina Faso';
|
||||||
|
case BG = 'Bulgarien';
|
||||||
|
case BH = 'Bahrain';
|
||||||
|
case BI = 'Burundi';
|
||||||
|
case BJ = 'Benin';
|
||||||
|
case BM = 'Bermudas';
|
||||||
|
case BN = 'Brunei Darussalam';
|
||||||
|
case BO = 'Bolivien';
|
||||||
|
case BR = 'Brasilien';
|
||||||
|
case BS = 'Bahamas';
|
||||||
|
case BT = 'Bhutan';
|
||||||
|
case BV = 'Bouvet Island';
|
||||||
|
case BW = 'Botswana';
|
||||||
|
case BY = 'Weißrußland (Belarus)';
|
||||||
|
case BZ = 'Belize';
|
||||||
|
case CA = 'Canada';
|
||||||
|
case CC = 'Cocos (Keeling) Islands';
|
||||||
|
case CD = 'Demokratische Republik Kongo';
|
||||||
|
case CF = 'Zentralafrikanische Republik';
|
||||||
|
case CG = 'Kongo';
|
||||||
|
case CH = 'Schweiz';
|
||||||
|
case CI = 'Elfenbeinküste (Cote D’Ivoire)';
|
||||||
|
case CK = 'Cook Islands';
|
||||||
|
case CL = 'Chile';
|
||||||
|
case CM = 'Kamerun';
|
||||||
|
case CN = 'China';
|
||||||
|
case CO = 'Kolumbien';
|
||||||
|
case CR = 'Costa Rica';
|
||||||
|
case CS = 'Tschechoslowakei (ehemalige)';
|
||||||
|
case CU = 'Kuba';
|
||||||
|
case CV = 'Kap Verde';
|
||||||
|
case CX = 'Christmas Island';
|
||||||
|
case CY = 'Zypern';
|
||||||
|
case CZ = 'Tschechische Republik';
|
||||||
|
case DE = 'Deutschland';
|
||||||
|
case DJ = 'Djibouti';
|
||||||
|
case DK = 'Dänemark';
|
||||||
|
case DM = 'Dominica';
|
||||||
|
case DO = 'Dominikanische Republik';
|
||||||
|
case DZ = 'Algerien';
|
||||||
|
case EC = 'Ecuador';
|
||||||
|
case EE = 'Estland';
|
||||||
|
case EG = 'Ägypten';
|
||||||
|
case EH = 'Westsahara';
|
||||||
|
case ER = 'Eritrea';
|
||||||
|
case ES = 'Spanien';
|
||||||
|
case ET = 'Äthiopien';
|
||||||
|
case FI = 'Finnland';
|
||||||
|
case FJ = 'Fiji';
|
||||||
|
case FK = 'Falkland-Inseln (Malvinas)';
|
||||||
|
case FM = 'Micronesien';
|
||||||
|
case FO = 'Faröer-Inseln';
|
||||||
|
case FR = 'Frankreich';
|
||||||
|
case FX = 'France, Metropolitan';
|
||||||
|
case GA = 'Gabon';
|
||||||
|
case GD = 'Grenada';
|
||||||
|
case GE = 'Georgien';
|
||||||
|
case GF = 'Französisch Guiana';
|
||||||
|
case GH = 'Ghana';
|
||||||
|
case GI = 'Gibraltar';
|
||||||
|
case GL = 'Grönland';
|
||||||
|
case GM = 'Gambia';
|
||||||
|
case GN = 'Guinea';
|
||||||
|
case GP = 'Guadeloupe';
|
||||||
|
case GQ = 'Äquatorialguinea';
|
||||||
|
case GR = 'Griechenland';
|
||||||
|
case GS = 'Südgeorgien und Südliche Sandwich-Inseln';
|
||||||
|
case GT = 'Guatemala';
|
||||||
|
case GU = 'Guam';
|
||||||
|
case GW = 'Guinea-Bissau';
|
||||||
|
case GY = 'Guyana';
|
||||||
|
case HK = 'Kong Hong';
|
||||||
|
case HM = 'Heard und Mc Donald Islands';
|
||||||
|
case HN = 'Honduras';
|
||||||
|
case HT = 'Haiti';
|
||||||
|
case HU = 'Ungarn';
|
||||||
|
case ID = 'Indonesien';
|
||||||
|
case IE = 'Irland';
|
||||||
|
case IL = 'Israel';
|
||||||
|
case IN = 'Indien';
|
||||||
|
case IO = 'British Indian Ocean Territory';
|
||||||
|
case IQ = 'Irak';
|
||||||
|
case IR = 'Iran (Islamische Republik)';
|
||||||
|
case IS = 'Island';
|
||||||
|
case IT = 'Italien';
|
||||||
|
case JM = 'Jamaica';
|
||||||
|
case JO = 'Jordanien';
|
||||||
|
case JP = 'Japan';
|
||||||
|
case KE = 'Kenya';
|
||||||
|
case KG = 'Kirgisien';
|
||||||
|
case KH = 'Königreich Kambodscha';
|
||||||
|
case KI = 'Kiribati';
|
||||||
|
case KM = 'Komoren';
|
||||||
|
case KN = 'Saint Kitts und Nevis';
|
||||||
|
case KP = 'Korea, Volksrepublik';
|
||||||
|
case KR = 'Korea';
|
||||||
|
case KW = 'Kuwait';
|
||||||
|
case KY = 'Kayman Islands';
|
||||||
|
case KZ = 'Kasachstan';
|
||||||
|
case LA = 'Laos';
|
||||||
|
case LB = 'Libanon';
|
||||||
|
case LC = 'Saint Lucia';
|
||||||
|
case LI = 'Liechtenstein';
|
||||||
|
case LK = 'Sri Lanka';
|
||||||
|
case LR = 'Liberia';
|
||||||
|
case LS = 'Lesotho';
|
||||||
|
case LT = 'Littauen';
|
||||||
|
case LU = 'Luxemburg';
|
||||||
|
case LV = 'Lettland';
|
||||||
|
case LY = 'Libyen';
|
||||||
|
case MA = 'Marokko';
|
||||||
|
case MC = 'Monaco';
|
||||||
|
case MD = 'Moldavien';
|
||||||
|
case MG = 'Madagaskar';
|
||||||
|
case MH = 'Marshall-Inseln';
|
||||||
|
case MK = 'Mazedonien, ehem. Jugoslawische Republik';
|
||||||
|
case ML = 'Mali';
|
||||||
|
case MM = 'Myanmar';
|
||||||
|
case MN = 'Mongolei';
|
||||||
|
case MO = 'Macao';
|
||||||
|
case MP = 'Nördliche Marianneninseln';
|
||||||
|
case MQ = 'Martinique';
|
||||||
|
case MR = 'Mauretanien';
|
||||||
|
case MS = 'Montserrat';
|
||||||
|
case MT = 'Malta';
|
||||||
|
case MU = 'Mauritius';
|
||||||
|
case MV = 'Malediven';
|
||||||
|
case MW = 'Malawi';
|
||||||
|
case MX = 'Mexico';
|
||||||
|
case MY = 'Malaysien';
|
||||||
|
case MZ = 'Mozambique';
|
||||||
|
case NA = 'Namibia';
|
||||||
|
case NC = 'Neu Kaledonien';
|
||||||
|
case NE = 'Niger';
|
||||||
|
case NF = 'Norfolk Island';
|
||||||
|
case NG = 'Nigeria';
|
||||||
|
case NI = 'Nicaragua';
|
||||||
|
case NL = 'Niederlande';
|
||||||
|
case NO = 'Norwegen';
|
||||||
|
case NP = 'Nepal';
|
||||||
|
case NR = 'Nauru';
|
||||||
|
case NU = 'Niue';
|
||||||
|
case NZ = 'Neuseeland';
|
||||||
|
case OM = 'Oman';
|
||||||
|
case PA = 'Panama';
|
||||||
|
case PE = 'Peru';
|
||||||
|
case PF = 'Französisch Polynesien';
|
||||||
|
case PG = 'Papua Neuguinea';
|
||||||
|
case PH = 'Philippinen';
|
||||||
|
case PK = 'Pakistan';
|
||||||
|
case PL = 'Polen';
|
||||||
|
case PM = 'St. Pierre und Miquelon';
|
||||||
|
case PN = 'Pitcairn';
|
||||||
|
case PR = 'Puerto Rico';
|
||||||
|
case PT = 'Portugal';
|
||||||
|
case PW = 'Palau';
|
||||||
|
case PY = 'Paraguay';
|
||||||
|
case QA = 'Katar';
|
||||||
|
case RE = 'Reunion';
|
||||||
|
case RO = 'Rumänien';
|
||||||
|
case RU = 'Russische Föderation';
|
||||||
|
case RW = 'Ruanda';
|
||||||
|
case SA = 'Saudi Arabien';
|
||||||
|
case SB = 'Salomonen';
|
||||||
|
case SC = 'Seychellen';
|
||||||
|
case SD = 'Sudan';
|
||||||
|
case SE = 'Schweden';
|
||||||
|
case SG = 'Singapur';
|
||||||
|
case SH = 'St. Helena';
|
||||||
|
case SI = 'Slovenien';
|
||||||
|
case SJ = 'Svalbard und Jan Mayen Islands';
|
||||||
|
case SK = 'Slowakei';
|
||||||
|
case SL = 'Sierra Leone';
|
||||||
|
case SM = 'San Marino';
|
||||||
|
case SN = 'Senegal';
|
||||||
|
case SO = 'Somalia';
|
||||||
|
case SR = 'Surinam';
|
||||||
|
case ST = 'Sao Tome und Principe';
|
||||||
|
case SV = 'El Salvador';
|
||||||
|
case SY = 'Syrien, Arabische Republik';
|
||||||
|
case SZ = 'Swaziland';
|
||||||
|
case TC = 'Turk und Caicos-Inseln';
|
||||||
|
case TD = 'Tschad';
|
||||||
|
case TF = 'Französisches Südl.Territorium';
|
||||||
|
case TG = 'Togo';
|
||||||
|
case TH = 'Thailand';
|
||||||
|
case TJ = 'Tadschikistan';
|
||||||
|
case TK = 'Tokelau';
|
||||||
|
case TM = 'Turkmenistan';
|
||||||
|
case TN = 'Tunesien';
|
||||||
|
case TO = 'Tonga';
|
||||||
|
case TP = 'Ost-Timor';
|
||||||
|
case TR = 'Türkei';
|
||||||
|
case TT = 'Trinidad und Tobago';
|
||||||
|
case TV = 'Tuvalu';
|
||||||
|
case TW = 'Taiwan';
|
||||||
|
case TZ = 'Tansania, United Republic of';
|
||||||
|
case UA = 'Ukraine';
|
||||||
|
case UG = 'Uganda';
|
||||||
|
case GB = 'Großbritannien';
|
||||||
|
case US = 'Vereinigte Staaten';
|
||||||
|
case UM = 'Vereinigte Staaten, Minor Outlying Islands';
|
||||||
|
case UY = 'Uruguay';
|
||||||
|
case UZ = 'Usbekistan';
|
||||||
|
case VA = 'Vatikanstaat';
|
||||||
|
case VC = 'Saint Vincent und Grenadines';
|
||||||
|
case VE = 'Venezuela';
|
||||||
|
case VG = 'Virgin Islands (Britisch)';
|
||||||
|
case VI = 'Virgin Islands (U.S.)';
|
||||||
|
case VN = 'Vietnam';
|
||||||
|
case VU = 'Vanuatu';
|
||||||
|
case WF = 'Wallis und Futuna Islands';
|
||||||
|
case WS = 'Samoa';
|
||||||
|
case YE = 'Jemen';
|
||||||
|
case YT = 'Mayotte';
|
||||||
|
case YU = 'Jugoslawien';
|
||||||
|
case ZA = 'Südafrika';
|
||||||
|
case ZM = 'Sambia';
|
||||||
|
case ZW = 'Zimbabw';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, array{name: string, id: string}>
|
||||||
|
*/
|
||||||
|
public static function forSelect(): array
|
||||||
|
{
|
||||||
|
return collect(static::cases())
|
||||||
|
->map(fn ($case) => ['id' => $case->value, 'name' => $case->value])
|
||||||
|
->toArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Contribution\Requests;
|
||||||
|
|
||||||
|
use App\Contribution\Data\MemberData;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
class GenerateApiRequest extends GenerateRequest {
|
||||||
|
/**
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
public function payload(): array
|
||||||
|
{
|
||||||
|
return $this->input();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateContribution(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function members(): Collection {
|
||||||
|
return MemberData::fromApi($this->value('members'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Contribution\Requests;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
|
use App\Contribution\ContributionFactory;
|
||||||
|
use App\Contribution\Data\MemberData;
|
||||||
|
use App\Contribution\Documents\ContributionDocument;
|
||||||
|
use App\Country;
|
||||||
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
|
class GenerateRequest extends ActionRequest implements HasContributionData {
|
||||||
|
/**
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
protected function payload(): array
|
||||||
|
{
|
||||||
|
return json_decode(rawurldecode(base64_decode($this->input('payload', ''))), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateContribution(): void {
|
||||||
|
Validator::make($this->payload(), app(ContributionFactory::class)->rules($this->type()))->validate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|array<array-key, mixed>
|
||||||
|
*/
|
||||||
|
public function value(string $key): string|array
|
||||||
|
{
|
||||||
|
return data_get($this->payload(), $key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return class-string<ContributionDocument>
|
||||||
|
*/
|
||||||
|
public function type(): string
|
||||||
|
{
|
||||||
|
return $this->value('type');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateFrom(): Carbon {
|
||||||
|
return Carbon::parse($this->value('dateFrom'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateUntil(): Carbon {
|
||||||
|
return Carbon::parse($this->value('dateUntil'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function zipLocation(): string {
|
||||||
|
return $this->value('zipLocation');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function eventName(): string {
|
||||||
|
return $this->value('eventName');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function members(): Collection {
|
||||||
|
return MemberData::fromModels($this->value('members'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function country(): ?Country {
|
||||||
|
return Country::where('id', $this->value('country'))->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ class FormApiListAction
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $filter
|
* @param string $filter
|
||||||
* @return LengthAwarePaginator<Form>
|
* @return LengthAwarePaginator<int, Form>
|
||||||
*/
|
*/
|
||||||
public function handle(string $filter, int $perPage): LengthAwarePaginator
|
public function handle(string $filter, int $perPage): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form\Actions;
|
||||||
|
|
||||||
|
use App\Form\Models\Form;
|
||||||
|
use App\Lib\Events\Succeeded;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
||||||
|
class FormCopyAction
|
||||||
|
{
|
||||||
|
use AsAction;
|
||||||
|
|
||||||
|
public function handle(Form $form): Form
|
||||||
|
{
|
||||||
|
$newForm = $form->replicate();
|
||||||
|
$newForm->save();
|
||||||
|
$newForm->update(['name' => $form->name.' - Kopie', 'is_active' => false]);
|
||||||
|
|
||||||
|
foreach ($form->getRegisteredMediaCollections() as $collection) {
|
||||||
|
foreach ($form->getMedia($collection->name) as $media) {
|
||||||
|
$media->copy($newForm, $collection->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ClearFrontendCacheAction::run();
|
||||||
|
|
||||||
|
return $form;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function asController(Form $form): JsonResponse
|
||||||
|
{
|
||||||
|
$this->handle($form);
|
||||||
|
|
||||||
|
Succeeded::message('Veranstaltung kopiert.')->dispatch();
|
||||||
|
return response()->json([]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form\Actions;
|
||||||
|
|
||||||
|
use App\Form\FormSettings;
|
||||||
|
use App\Form\Models\Form;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
||||||
|
class FormGenerateLaterlinkAction
|
||||||
|
{
|
||||||
|
use AsAction;
|
||||||
|
|
||||||
|
public function asController(Form $form)
|
||||||
|
{
|
||||||
|
$registerUrl = str(app(FormSettings::class)->registerUrl)->replace('{slug}', $form->slug)->toString();
|
||||||
|
$laterId = str()->uuid()->toString();
|
||||||
|
$laterUrl = URL::signedRoute('form.register', ['form' => $form, 'later' => '1', 'id' => $laterId]);
|
||||||
|
$urlParts = parse_url($laterUrl);
|
||||||
|
|
||||||
|
Cache::remember('later_'.$laterId, 2592000, fn () => $form->id); // Link ist 40 Tage gültig
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'url' => $registerUrl.'?'.data_get($urlParts, 'query')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ class FormIndexAction
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LengthAwarePaginator<Form>
|
* @return LengthAwarePaginator<int, Form>
|
||||||
*/
|
*/
|
||||||
public function handle(string $filter): LengthAwarePaginator
|
public function handle(string $filter): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,10 @@ class FormStoreAction
|
||||||
'needs_prevention' => 'present|boolean',
|
'needs_prevention' => 'present|boolean',
|
||||||
'prevention_text' => 'array',
|
'prevention_text' => 'array',
|
||||||
'prevention_conditions' => 'array',
|
'prevention_conditions' => 'array',
|
||||||
|
'leader_conditions' => 'array',
|
||||||
|
'zip' => 'present|nullable|string',
|
||||||
|
'location' => 'present|nullable|string',
|
||||||
|
'country' => 'nullable|string|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Form\Actions;
|
namespace App\Form\Actions;
|
||||||
|
|
||||||
use App\Form\Models\Form;
|
use App\Form\Models\Form;
|
||||||
use App\Lib\Editor\Condition;
|
|
||||||
use App\Lib\Events\Succeeded;
|
use App\Lib\Events\Succeeded;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
@ -36,6 +35,10 @@ class FormUpdateAction
|
||||||
'needs_prevention' => 'present|boolean',
|
'needs_prevention' => 'present|boolean',
|
||||||
'prevention_text' => 'array',
|
'prevention_text' => 'array',
|
||||||
'prevention_conditions' => 'array',
|
'prevention_conditions' => 'array',
|
||||||
|
'location' => 'present|nullable|string',
|
||||||
|
'zip' => 'present|nullable|string',
|
||||||
|
'country' => 'nullable|string|max:255',
|
||||||
|
'leader_conditions' => 'array',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class FormtemplateIndexAction
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LengthAwarePaginator<Formtemplate>
|
* @return LengthAwarePaginator<int, Formtemplate>
|
||||||
*/
|
*/
|
||||||
public function handle(): LengthAwarePaginator
|
public function handle(): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form\Actions;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
|
use App\Contribution\ContributionFactory;
|
||||||
|
use App\Form\Models\Form;
|
||||||
|
use App\Form\Requests\FormCompileRequest;
|
||||||
|
use App\Rules\JsonBase64Rule;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
use Zoomyboy\Tex\BaseCompiler;
|
||||||
|
use Zoomyboy\Tex\Tex;
|
||||||
|
|
||||||
|
class GenerateContributionAction
|
||||||
|
{
|
||||||
|
use AsAction;
|
||||||
|
|
||||||
|
public function handle(HasContributionData $request): BaseCompiler
|
||||||
|
{
|
||||||
|
return Tex::compile($request->type()::fromPayload($request));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function asController(ActionRequest $request, Form $form): BaseCompiler|JsonResponse
|
||||||
|
{
|
||||||
|
$r = FormCompileRequest::from(['form' => $form]);
|
||||||
|
app(ContributionFactory::class)->validateType($r);
|
||||||
|
$r->validateContribution();
|
||||||
|
|
||||||
|
return $request->input('validate')
|
||||||
|
? response()->json([])
|
||||||
|
: $this->handle($r);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'payload' => [new JsonBase64Rule()],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,9 @@ use App\Form\Models\Form;
|
||||||
use App\Form\Models\Participant;
|
use App\Form\Models\Participant;
|
||||||
use App\Member\Member;
|
use App\Member\Member;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
@ -20,10 +23,6 @@ class RegisterAction
|
||||||
*/
|
*/
|
||||||
public function handle(Form $form, array $input): Participant
|
public function handle(Form $form, array $input): Participant
|
||||||
{
|
{
|
||||||
if (!$form->canRegister()) {
|
|
||||||
throw ValidationException::withMessages(['event' => 'Anmeldung zzt nicht möglich.']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$memberQuery = FieldCollection::fromRequest($form, $input)
|
$memberQuery = FieldCollection::fromRequest($form, $input)
|
||||||
->withNamiType()
|
->withNamiType()
|
||||||
->reduce(fn($query, $field) => $field->namiType->performQuery($query, $field->value), (new Member())->newQuery());
|
->reduce(fn($query, $field) => $field->namiType->performQuery($query, $field->value), (new Member())->newQuery());
|
||||||
|
@ -77,8 +76,34 @@ class RegisterAction
|
||||||
|
|
||||||
public function asController(ActionRequest $request, Form $form): JsonResponse
|
public function asController(ActionRequest $request, Form $form): JsonResponse
|
||||||
{
|
{
|
||||||
|
if (!$form->canRegister() && !$this->isRegisteringLater($request, $form)) {
|
||||||
|
throw ValidationException::withMessages(['event' => 'Anmeldung zzt nicht möglich.']);
|
||||||
|
}
|
||||||
|
|
||||||
$participant = $this->handle($form, $request->validated());
|
$participant = $this->handle($form, $request->validated());
|
||||||
|
|
||||||
|
if ($this->isRegisteringLater($request, $form)) {
|
||||||
|
Cache::forget('later_'.request('id'));
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json($participant);
|
return response()->json($participant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isRegisteringLater(ActionRequest $request, Form $form): bool {
|
||||||
|
if (!is_array($request->query())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$validator = Validator::make($request->query(), [
|
||||||
|
'later' => 'required|numeric|in:1',
|
||||||
|
'id' => 'required|string|uuid:4',
|
||||||
|
'signature' => 'required|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (!URL::hasValidSignature($request) || $validator->fails()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Cache::get('later_'.data_get($validator->validated(), 'id')) === $form->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,12 @@ class FieldCollection extends Collection
|
||||||
return $this->map(fn ($field) => $field->presentRaw())->toArray();
|
return $this->map(fn ($field) => $field->presentRaw())->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findBySpecialType(SpecialType $specialType): ?Field
|
public function hasSpecialType(SpecialType $specialType): bool
|
||||||
|
{
|
||||||
|
return $this->findBySpecialType($specialType) !== null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function findBySpecialType(SpecialType $specialType): ?Field
|
||||||
{
|
{
|
||||||
return $this->first(fn ($field) => $field->specialType === $specialType);
|
return $this->first(fn ($field) => $field->specialType === $specialType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,11 @@ enum SpecialType: string
|
||||||
case FIRSTNAME = 'Vorname';
|
case FIRSTNAME = 'Vorname';
|
||||||
case LASTNAME = 'Nachname';
|
case LASTNAME = 'Nachname';
|
||||||
case EMAIL = 'E-Mail-Adresse';
|
case EMAIL = 'E-Mail-Adresse';
|
||||||
|
case BIRTHDAY = 'Geburtsdatum';
|
||||||
|
case ZIP = 'PLZ';
|
||||||
|
case LOCATION = 'Ort';
|
||||||
|
case ADDRESS = 'Adresse';
|
||||||
|
case GENDER = 'Geschlecht';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<int, array{name: string, id: string}>
|
* @return array<int, array{name: string, id: string}>
|
||||||
|
|
|
@ -69,10 +69,8 @@ class ConfirmRegistrationMail extends Mailable
|
||||||
*/
|
*/
|
||||||
public function attachments()
|
public function attachments()
|
||||||
{
|
{
|
||||||
$conditionResolver = app(FormConditionResolver::class)->forParticipant($this->participant);
|
|
||||||
|
|
||||||
return $this->participant->form->getMedia('mailattachments')
|
return $this->participant->form->getMedia('mailattachments')
|
||||||
->filter(fn ($media) => $conditionResolver->filterCondition(Condition::fromMedia($media)))
|
->filter(fn ($media) => $this->participant->matchesCondition(Condition::fromMedia($media)))
|
||||||
->map(fn ($media) => Attachment::fromStorageDisk($media->disk, $media->getPathRelativeToRoot()))
|
->map(fn ($media) => Attachment::fromStorageDisk($media->disk, $media->getPathRelativeToRoot()))
|
||||||
->all();
|
->all();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Form\Models;
|
namespace App\Form\Models;
|
||||||
|
|
||||||
|
use App\Contribution\Enums\Country;
|
||||||
use App\Form\Actions\UpdateParticipantSearchIndexAction;
|
use App\Form\Actions\UpdateParticipantSearchIndexAction;
|
||||||
use App\Form\Data\ExportData;
|
use App\Form\Data\ExportData;
|
||||||
use App\Form\Data\FieldCollection;
|
use App\Form\Data\FieldCollection;
|
||||||
|
@ -18,7 +19,6 @@ use Laravel\Scout\Searchable;
|
||||||
use Spatie\Image\Enums\Fit;
|
use Spatie\Image\Enums\Fit;
|
||||||
use Spatie\MediaLibrary\HasMedia;
|
use Spatie\MediaLibrary\HasMedia;
|
||||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
|
||||||
use Zoomyboy\MedialibraryHelper\DefersUploads;
|
use Zoomyboy\MedialibraryHelper\DefersUploads;
|
||||||
|
|
||||||
/** @todo replace editor content with EditorData cast */
|
/** @todo replace editor content with EditorData cast */
|
||||||
|
@ -49,6 +49,8 @@ class Form extends Model implements HasMedia
|
||||||
'to' => 'datetime',
|
'to' => 'datetime',
|
||||||
'registration_from' => 'datetime',
|
'registration_from' => 'datetime',
|
||||||
'registration_until' => 'datetime',
|
'registration_until' => 'datetime',
|
||||||
|
'country' => Country::class,
|
||||||
|
'leader_conditions' => Condition::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,15 +71,14 @@ class Form extends Model implements HasMedia
|
||||||
return $this->hasMany(Participant::class);
|
return $this->hasMany(Participant::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('headerImage')
|
$this->addMediaCollection('headerImage')
|
||||||
->singleFile()
|
->singleFile()
|
||||||
->maxWidth(fn() => 500)
|
->maxWidth(fn() => 500)
|
||||||
->forceFileName(fn (Form $model, string $name) => $model->slug)
|
->forceFileName(fn(Form $model) => $model->slug)
|
||||||
->convert(fn() => 'jpg')
|
->convert(fn() => 'jpg')
|
||||||
->registerMediaConversions(function (Media $media) {
|
->registerMediaConversions(function () {
|
||||||
$this->addMediaConversion('square')->fit(Fit::Crop, 400, 400);
|
$this->addMediaConversion('square')->fit(Fit::Crop, 400, 400);
|
||||||
});
|
});
|
||||||
$this->addMediaCollection('mailattachments')
|
$this->addMediaCollection('mailattachments')
|
||||||
|
@ -189,8 +190,7 @@ class Form extends Model implements HasMedia
|
||||||
return Sorting::from($this->meta['sorting']);
|
return Sorting::from($this->meta['sorting']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canRegister(): bool
|
public function isInDates(): bool {
|
||||||
{
|
|
||||||
if ($this->registration_from && $this->registration_from->gt(now())) {
|
if ($this->registration_from && $this->registration_from->gt(now())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -201,4 +201,9 @@ class Form extends Model implements HasMedia
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canRegister(): bool
|
||||||
|
{
|
||||||
|
return $this->is_active && $this->isInDates();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ namespace App\Form\Models;
|
||||||
|
|
||||||
use App\Form\Data\FieldCollection;
|
use App\Form\Data\FieldCollection;
|
||||||
use App\Form\Data\FormConfigData;
|
use App\Form\Data\FormConfigData;
|
||||||
|
use App\Form\Editor\FormConditionResolver;
|
||||||
use App\Form\Mails\ConfirmRegistrationMail;
|
use App\Form\Mails\ConfirmRegistrationMail;
|
||||||
use App\Form\Scopes\ParticipantFilterScope;
|
use App\Lib\Editor\Condition;
|
||||||
use App\Member\Member;
|
use App\Member\Member;
|
||||||
use App\Prevention\Contracts\Preventable;
|
use App\Prevention\Contracts\Preventable;
|
||||||
use Database\Factories\Form\Models\ParticipantFactory;
|
use Database\Factories\Form\Models\ParticipantFactory;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
@ -110,4 +110,8 @@ class Participant extends Model implements Preventable
|
||||||
{
|
{
|
||||||
return [...$this->data, 'parent-id' => $this->parent_id, 'created_at' => $this->created_at->timestamp];
|
return [...$this->data, 'parent-id' => $this->parent_id, 'created_at' => $this->created_at->timestamp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function matchesCondition(Condition $condition): bool {
|
||||||
|
return app(FormConditionResolver::class)->forParticipant($this)->filterCondition($condition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form\Requests;
|
||||||
|
|
||||||
|
use App\Contribution\Contracts\HasContributionData;
|
||||||
|
use App\Contribution\Data\MemberData;
|
||||||
|
use App\Contribution\Documents\ContributionDocument;
|
||||||
|
use App\Country;
|
||||||
|
use App\Form\Editor\FormConditionResolver;
|
||||||
|
use App\Form\Enums\SpecialType;
|
||||||
|
use App\Form\Models\Form;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
|
||||||
|
class FormCompileRequest extends Data implements HasContributionData {
|
||||||
|
|
||||||
|
public function __construct(public Form $form) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return class-string<ContributionDocument>
|
||||||
|
*/
|
||||||
|
public function type(): string
|
||||||
|
{
|
||||||
|
$payload = json_decode(rawurldecode(base64_decode(request()->input('payload'))), true);
|
||||||
|
|
||||||
|
return $payload['type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateFrom(): Carbon
|
||||||
|
{
|
||||||
|
return $this->form->from;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateUntil(): Carbon
|
||||||
|
{
|
||||||
|
return $this->form->to;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function zipLocation(): string
|
||||||
|
{
|
||||||
|
return $this->form->zip.' '.$this->form->location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function eventName(): string
|
||||||
|
{
|
||||||
|
return $this->form->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function members(): Collection
|
||||||
|
{
|
||||||
|
$members = [];
|
||||||
|
$fields = [
|
||||||
|
[SpecialType::FIRSTNAME, 'firstname'],
|
||||||
|
[SpecialType::LASTNAME, 'lastname'],
|
||||||
|
[SpecialType::BIRTHDAY, 'birthday'],
|
||||||
|
[SpecialType::GENDER, 'gender'],
|
||||||
|
[SpecialType::ADDRESS, 'address'],
|
||||||
|
[SpecialType::ZIP, 'zip'],
|
||||||
|
[SpecialType::LOCATION, 'location'],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($this->form->participants as $participant) {
|
||||||
|
$member = [];
|
||||||
|
foreach ($fields as [$type, $name]) {
|
||||||
|
$f = $this->form->getFields()->findBySpecialType($type);
|
||||||
|
if (!$f) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$member[$name] = $participant->getFields()->find($f)->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$members[] = [
|
||||||
|
'is_leader' => $participant->matchesCondition($participant->form->leader_conditions),
|
||||||
|
'gender' => 'weiblich',
|
||||||
|
...$member,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return MemberData::fromApi($members);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function country(): ?Country
|
||||||
|
{
|
||||||
|
return Country::first();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function validateContribution(): void
|
||||||
|
{
|
||||||
|
Validator::make($this->form->toArray(), [
|
||||||
|
'zip' => 'required',
|
||||||
|
'location' => 'required'
|
||||||
|
])
|
||||||
|
->after(function($validator) {
|
||||||
|
foreach ($this->type()::requiredFormSpecialTypes() as $type) {
|
||||||
|
if (!$this->form->getFields()->hasSpecialType($type)) {
|
||||||
|
$validator->errors()->add($type->name, 'Kein Feld für ' . $type->value . ' vorhanden.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($this->form->participants->count() === 0) {
|
||||||
|
$validator->errors()->add('participants', 'Veranstaltung besitzt noch keine Teilnehmer*innen.');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->validate();
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Form\Resources;
|
namespace App\Form\Resources;
|
||||||
|
|
||||||
|
use App\Contribution\Enums\Country;
|
||||||
use App\Form\Data\ExportData;
|
use App\Form\Data\ExportData;
|
||||||
use App\Form\Enums\NamiType;
|
use App\Form\Enums\NamiType;
|
||||||
use App\Form\Enums\SpecialType;
|
use App\Form\Enums\SpecialType;
|
||||||
|
@ -14,6 +15,7 @@ use App\Group;
|
||||||
use App\Lib\Editor\EditorData;
|
use App\Lib\Editor\EditorData;
|
||||||
use App\Lib\HasMeta;
|
use App\Lib\HasMeta;
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
use App\Contribution\ContributionFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mixin Form
|
* @mixin Form
|
||||||
|
@ -44,6 +46,7 @@ class FormResource extends JsonResource
|
||||||
'mail_bottom' => $this->mail_bottom,
|
'mail_bottom' => $this->mail_bottom,
|
||||||
'registration_from' => $this->registration_from?->format('Y-m-d H:i:s'),
|
'registration_from' => $this->registration_from?->format('Y-m-d H:i:s'),
|
||||||
'registration_until' => $this->registration_until?->format('Y-m-d H:i:s'),
|
'registration_until' => $this->registration_until?->format('Y-m-d H:i:s'),
|
||||||
|
'is_in_dates' => $this->isInDates(),
|
||||||
'config' => $this->config,
|
'config' => $this->config,
|
||||||
'participants_count' => $this->participants_count,
|
'participants_count' => $this->participants_count,
|
||||||
'is_active' => $this->is_active,
|
'is_active' => $this->is_active,
|
||||||
|
@ -53,14 +56,21 @@ class FormResource extends JsonResource
|
||||||
'needs_prevention' => $this->needs_prevention,
|
'needs_prevention' => $this->needs_prevention,
|
||||||
'prevention_text' => $this->prevention_text,
|
'prevention_text' => $this->prevention_text,
|
||||||
'prevention_conditions' => $this->prevention_conditions,
|
'prevention_conditions' => $this->prevention_conditions,
|
||||||
|
'leader_conditions' => $this->leader_conditions,
|
||||||
|
'zip' => $this->zip,
|
||||||
|
'location' => $this->location,
|
||||||
|
'country' => $this->country,
|
||||||
'links' => [
|
'links' => [
|
||||||
'participant_index' => route('form.participant.index', ['form' => $this->getModel(), 'parent' => null]),
|
'participant_index' => route('form.participant.index', ['form' => $this->getModel(), 'parent' => null]),
|
||||||
'participant_root_index' => route('form.participant.index', ['form' => $this->getModel(), 'parent' => -1]),
|
'participant_root_index' => route('form.participant.index', ['form' => $this->getModel(), 'parent' => -1]),
|
||||||
'update' => route('form.update', ['form' => $this->getModel()]),
|
'update' => route('form.update', $this->getModel()),
|
||||||
'destroy' => route('form.destroy', ['form' => $this->getModel()]),
|
'destroy' => route('form.destroy', $this->getModel()),
|
||||||
'is_dirty' => route('form.is-dirty', ['form' => $this->getModel()]),
|
'is_dirty' => route('form.is-dirty', $this->getModel()),
|
||||||
'frontend' => str(app(FormSettings::class)->registerUrl)->replace('{slug}', $this->slug),
|
'frontend' => str(app(FormSettings::class)->registerUrl)->replace('{slug}', $this->slug),
|
||||||
'export' => route('form.export', ['form' => $this->getModel()]),
|
'export' => route('form.export', $this->getModel()),
|
||||||
|
'copy' => route('form.copy', $this->getModel()),
|
||||||
|
'contribution' => route('form.contribution', $this->getModel()),
|
||||||
|
'laterlink' => route('form.laterlink', $this->getModel()),
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -82,6 +92,8 @@ class FormResource extends JsonResource
|
||||||
'templates' => FormtemplateResource::collection(Formtemplate::get()),
|
'templates' => FormtemplateResource::collection(Formtemplate::get()),
|
||||||
'namiTypes' => NamiType::forSelect(),
|
'namiTypes' => NamiType::forSelect(),
|
||||||
'specialTypes' => SpecialType::forSelect(),
|
'specialTypes' => SpecialType::forSelect(),
|
||||||
|
'countries' => Country::forSelect(),
|
||||||
|
'contribution_types' => app(ContributionFactory::class)->compilerSelect(),
|
||||||
'default' => [
|
'default' => [
|
||||||
'description' => [],
|
'description' => [],
|
||||||
'is_active' => true,
|
'is_active' => true,
|
||||||
|
@ -101,6 +113,9 @@ class FormResource extends JsonResource
|
||||||
'id' => null,
|
'id' => null,
|
||||||
'export' => ExportData::from([]),
|
'export' => ExportData::from([]),
|
||||||
'prevention_conditions' => ['mode' => 'all', 'ifs' => []],
|
'prevention_conditions' => ['mode' => 'all', 'ifs' => []],
|
||||||
|
'zip' => '',
|
||||||
|
'location' => '',
|
||||||
|
'country' => null,
|
||||||
],
|
],
|
||||||
'section_default' => [
|
'section_default' => [
|
||||||
'name' => '',
|
'name' => '',
|
||||||
|
|
|
@ -71,7 +71,7 @@ class InitializeAction
|
||||||
|
|
||||||
public function asController(ActionRequest $request, NamiSettings $settings): RedirectResponse
|
public function asController(ActionRequest $request, NamiSettings $settings): RedirectResponse
|
||||||
{
|
{
|
||||||
$settings->mglnr = (int) $request->input('mglnr');
|
$settings->mglnr = $request->input('mglnr');
|
||||||
$settings->password = $request->input('password');
|
$settings->password = $request->input('password');
|
||||||
$settings->default_group_id = (int) $request->input('group_id');
|
$settings->default_group_id = (int) $request->input('group_id');
|
||||||
$settings->search_params = $request->input('params');
|
$settings->search_params = $request->input('params');
|
||||||
|
|
|
@ -21,7 +21,7 @@ class NamiGetSearchLayerAction
|
||||||
*/
|
*/
|
||||||
public function handle(array $input): Collection
|
public function handle(array $input): Collection
|
||||||
{
|
{
|
||||||
return Nami::login((int) $input['mglnr'], $input['password'])->searchLayerOptions(
|
return Nami::login($input['mglnr'], $input['password'])->searchLayerOptions(
|
||||||
SearchLayer::from($input['layer'] ?: 0),
|
SearchLayer::from($input['layer'] ?: 0),
|
||||||
$input['parent'] ?: null
|
$input['parent'] ?: null
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,7 @@ class NamiLoginCheckAction
|
||||||
*/
|
*/
|
||||||
public function handle(array $input): void
|
public function handle(array $input): void
|
||||||
{
|
{
|
||||||
Nami::freshLogin((int) $input['mglnr'], $input['password']);
|
Nami::freshLogin($input['mglnr'], $input['password']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ class NamiSearchAction
|
||||||
/**
|
/**
|
||||||
* @param array<string, mixed> $params
|
* @param array<string, mixed> $params
|
||||||
*
|
*
|
||||||
* @return LengthAwarePaginator<MemberEntry>
|
* @return LengthAwarePaginator<int, MemberEntry>
|
||||||
*/
|
*/
|
||||||
public function handle(Api $api, int $page, array $params, int $perPage = 10): LengthAwarePaginator
|
public function handle(Api $api, int $page, array $params, int $perPage = 10): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ class NamiSearchAction
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LengthAwarePaginator<MemberEntry>
|
* @return LengthAwarePaginator<int, MemberEntry>
|
||||||
*/
|
*/
|
||||||
public function asController(ActionRequest $request): LengthAwarePaginator
|
public function asController(ActionRequest $request): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace App\Invoice\Scopes;
|
||||||
|
|
||||||
use App\Invoice\Enums\InvoiceStatus;
|
use App\Invoice\Enums\InvoiceStatus;
|
||||||
use App\Invoice\Models\Invoice;
|
use App\Invoice\Models\Invoice;
|
||||||
use App\Lib\Filter;
|
|
||||||
use App\Lib\ScoutFilter;
|
use App\Lib\ScoutFilter;
|
||||||
use Laravel\Scout\Builder;
|
use Laravel\Scout\Builder;
|
||||||
use Spatie\LaravelData\Attributes\MapInputName;
|
use Spatie\LaravelData\Attributes\MapInputName;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Lib\Data;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\Normalizers\Normalizer;
|
||||||
|
use App\Lib\Normalizers\DateNormalizer;
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
use Spatie\LaravelData\Attributes\WithTransformer;
|
||||||
|
use App\Lib\Transformers\DateTransformer;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class DateData extends Data
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
#[WithTransformer(DateTransformer::class)]
|
||||||
|
public Carbon $raw,
|
||||||
|
public string $human,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, class-string<Normalizer>>
|
||||||
|
*/
|
||||||
|
public static function normalizers(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
DateNormalizer::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Lib\Data;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
|
||||||
|
class RecordData extends Data {
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
public int $id,
|
||||||
|
public string $name,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
}
|
|
@ -14,10 +14,12 @@ abstract class Filter extends Data
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Builder<T> $query
|
|
||||||
* @return Builder<T>
|
* @return Builder<T>
|
||||||
*/
|
*/
|
||||||
abstract public function apply(Builder $query): Builder;
|
abstract public function getQuery(): Builder;
|
||||||
|
|
||||||
|
/** @var Builder<T> */
|
||||||
|
protected Builder $query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<string, mixed>|string|null $request
|
* @param array<string, mixed>|string|null $request
|
||||||
|
@ -36,14 +38,6 @@ abstract class Filter extends Data
|
||||||
*/
|
*/
|
||||||
public static function fromPost(?array $post = null): static
|
public static function fromPost(?array $post = null): static
|
||||||
{
|
{
|
||||||
return static::factory()->withoutMagicalCreation()->from($post ?: [])->toDefault();
|
return static::factory()->withoutMagicalCreation()->from($post ?: []);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return static
|
|
||||||
*/
|
|
||||||
public function toDefault(): self
|
|
||||||
{
|
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Lib;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\PaginatedDataCollection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @mixin Spatie\LaravelData\Data
|
||||||
|
*/
|
||||||
|
trait HasDataMeta
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public static function collectPages(mixed $items): array {
|
||||||
|
$source = parent::collect($items, PaginatedDataCollection::class)->toArray();
|
||||||
|
return [
|
||||||
|
...parent::collect($items, PaginatedDataCollection::class)->toArray(),
|
||||||
|
'meta' => [...$source['meta'], ...static::meta()]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
namespace App\Lib;
|
namespace App\Lib;
|
||||||
|
|
||||||
/** @mixin \Illuminate\Http\Resources\Json\JsonResource */
|
/**
|
||||||
|
* @mixin \Illuminate\Http\Resources\Json\JsonResource
|
||||||
|
*/
|
||||||
trait HasMeta
|
trait HasMeta
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Lib\Normalizers;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\Normalizers\Normalizer;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class DateNormalizer implements Normalizer
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public function normalize(mixed $value): ?array
|
||||||
|
{
|
||||||
|
if (!$value instanceof Carbon) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'raw' => $value,
|
||||||
|
'human' => $value->format('d.m.Y'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Lib\Transformers;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\Transformers\Transformer;
|
||||||
|
use Spatie\LaravelData\Support\DataProperty;
|
||||||
|
use Spatie\LaravelData\Support\Transformation\TransformationContext;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class DateTransformer implements Transformer
|
||||||
|
{
|
||||||
|
public function transform(DataProperty $property, mixed $value, TransformationContext $context): string
|
||||||
|
{
|
||||||
|
return Carbon::parse($value)->format('Y-m-d');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Member\Data;
|
||||||
|
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
use App\Member\Member;
|
||||||
|
|
||||||
|
class MemberData extends Data
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
public string $fullname,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
public static function fromModel(Member $member): static
|
||||||
|
{
|
||||||
|
return static::factory()->withoutMagicalCreation()->from([
|
||||||
|
'fullname' => $member->fullname
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Member\Data;
|
||||||
|
|
||||||
|
use App\Activity;
|
||||||
|
use App\Group;
|
||||||
|
use Spatie\LaravelData\Data;
|
||||||
|
use App\Lib\Data\DateData;
|
||||||
|
use App\Lib\Data\RecordData;
|
||||||
|
use App\Lib\HasDataMeta;
|
||||||
|
use App\Member\Membership;
|
||||||
|
use App\Membership\FilterScope;
|
||||||
|
use App\Subactivity;
|
||||||
|
|
||||||
|
class MembershipData extends Data
|
||||||
|
{
|
||||||
|
|
||||||
|
use HasDataMeta;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, string> $links
|
||||||
|
*/
|
||||||
|
public function __construct(
|
||||||
|
public int $id,
|
||||||
|
public RecordData $activity,
|
||||||
|
public ?RecordData $subactivity,
|
||||||
|
public RecordData $group,
|
||||||
|
public ?DateData $promisedAt,
|
||||||
|
public DateData $from,
|
||||||
|
public ?DateData $to,
|
||||||
|
public MemberData $member,
|
||||||
|
public bool $isActive,
|
||||||
|
public array $links,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
public static function fromModel(Membership $membership): static
|
||||||
|
{
|
||||||
|
return static::factory()->withoutMagicalCreation()->from([
|
||||||
|
'id' => $membership->id,
|
||||||
|
'activity' => $membership->activity,
|
||||||
|
'subactivity' => $membership->subactivity,
|
||||||
|
'isActive' => $membership->isActive(),
|
||||||
|
'from' => $membership->from,
|
||||||
|
'to' => $membership->to,
|
||||||
|
'group' => $membership->group,
|
||||||
|
'promisedAt' => $membership->promised_at,
|
||||||
|
'member' => $membership->member,
|
||||||
|
'links' => [
|
||||||
|
'update' => route('membership.update', $membership),
|
||||||
|
'destroy' => route('membership.destroy', $membership),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public static function meta(): array {
|
||||||
|
return [
|
||||||
|
'activities' => RecordData::collect(Activity::get()),
|
||||||
|
'subactivities' => RecordData::collect(Subactivity::get()),
|
||||||
|
'groups' => RecordData::collect(Group::get()),
|
||||||
|
'filter' => FilterScope::fromRequest(request()->input('filter', '')),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -79,6 +79,19 @@ class Membership extends Model
|
||||||
->where(fn ($query) => $query->whereNull('to')->orWhere('to', '>=', now()));
|
->where(fn ($query) => $query->whereNull('to')->orWhere('to', '>=', now()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Builder<Membership> $query
|
||||||
|
*
|
||||||
|
* @return Builder<Membership>
|
||||||
|
*/
|
||||||
|
public function scopeInactive(Builder $query): Builder
|
||||||
|
{
|
||||||
|
return $query->where(fn ($q) => $q
|
||||||
|
->orWhere('from', '>=', now())
|
||||||
|
->orWhere('to', '<=', now())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Builder<Membership> $query
|
* @param Builder<Membership> $query
|
||||||
*
|
*
|
||||||
|
|
|
@ -10,6 +10,7 @@ use App\Maildispatcher\Actions\ResyncAction;
|
||||||
use App\Member\Member;
|
use App\Member\Member;
|
||||||
use App\Member\Membership;
|
use App\Member\Membership;
|
||||||
use App\Subactivity;
|
use App\Subactivity;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
@ -20,13 +21,18 @@ class MassStoreAction
|
||||||
use TracksJob;
|
use TracksJob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<string, string>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'group_id' => 'required|numeric|exists:groups,id',
|
'group_id' => 'required|numeric|exists:groups,id',
|
||||||
'activity_id' => 'required|numeric|exists:activities,id',
|
'activity_id' => ['required', 'numeric', 'exists:activities,id', function($key, $value, $fail) {
|
||||||
|
$activity = Activity::findOrFail($value);
|
||||||
|
if ($activity->subactivities->pluck('id')->doesntContain(request()->subactivity_id)) {
|
||||||
|
return $fail(':attribute ist nicht vorhanden.');
|
||||||
|
}
|
||||||
|
}],
|
||||||
'subactivity_id' => 'required|numeric|exists:subactivities,id',
|
'subactivity_id' => 'required|numeric|exists:subactivities,id',
|
||||||
'members' => 'array',
|
'members' => 'array',
|
||||||
'members.*' => 'numeric|exists:members,id',
|
'members.*' => 'numeric|exists:members,id',
|
||||||
|
@ -48,9 +54,7 @@ class MassStoreAction
|
||||||
Membership::where($attributes)->active()->whereNotIn('member_id', $members)->get()
|
Membership::where($attributes)->active()->whereNotIn('member_id', $members)->get()
|
||||||
->each(fn ($membership) => MembershipDestroyAction::run($membership->id));
|
->each(fn ($membership) => MembershipDestroyAction::run($membership->id));
|
||||||
|
|
||||||
collect($members)
|
Member::whereIn('id', $members)->whereDoesntHave('memberships', fn ($q) => $q->where($attributes))->get()
|
||||||
->except(Membership::where($attributes)->active()->pluck('member_id'))
|
|
||||||
->map(fn ($memberId) => Member::findOrFail($memberId))
|
|
||||||
->each(fn ($member) => MembershipStoreAction::run(
|
->each(fn ($member) => MembershipStoreAction::run(
|
||||||
$member,
|
$member,
|
||||||
$activity,
|
$activity,
|
||||||
|
@ -59,12 +63,11 @@ class MassStoreAction
|
||||||
null,
|
null,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
ResyncAction::dispatch();
|
ResyncAction::dispatch();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function asController(ActionRequest $request): void
|
public function asController(ActionRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var array{members: array<int, int>, group_id: int, activity_id: int, subactivity_id: int}
|
* @var array{members: array<int, int>, group_id: int, activity_id: int, subactivity_id: int}
|
||||||
|
@ -77,6 +80,19 @@ class MassStoreAction
|
||||||
Subactivity::findOrFail($input['subactivity_id']),
|
Subactivity::findOrFail($input['subactivity_id']),
|
||||||
$input['members'],
|
$input['members'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return response()->json([], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
public function getValidationAttributes(): array {
|
||||||
|
return [
|
||||||
|
'activity_id' => 'Tätigkeit',
|
||||||
|
'subactivity_id' => 'Untertätigkeit',
|
||||||
|
'group_id' => 'Gruppe',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
||||||
use Lorisleiva\Actions\Concerns\AsAction;
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
||||||
class IndexAction
|
class MemberIndexAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Membership\Actions;
|
||||||
|
|
||||||
|
use App\Member\Data\MembershipData;
|
||||||
|
use App\Membership\FilterScope;
|
||||||
|
use Inertia\Inertia;
|
||||||
|
use Inertia\Response;
|
||||||
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
|
use Lorisleiva\Actions\Concerns\AsAction;
|
||||||
|
|
||||||
|
class MembershipIndexAction
|
||||||
|
{
|
||||||
|
use AsAction;
|
||||||
|
|
||||||
|
public function asController(ActionRequest $request): Response
|
||||||
|
{
|
||||||
|
return Inertia::render(
|
||||||
|
'membership/Index',
|
||||||
|
['data' => MembershipData::collectPages(FilterScope::fromRequest($request->input('filter', ''))->getQuery()->paginate(20))]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Membership;
|
||||||
|
|
||||||
|
use App\Lib\Filter;
|
||||||
|
use App\Member\Membership;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends Filter<Membership>
|
||||||
|
*/
|
||||||
|
class FilterScope extends Filter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param array<int, int> $activities
|
||||||
|
* @param array<int, int> $subactivities
|
||||||
|
* @param array<int, int> $groups
|
||||||
|
*/
|
||||||
|
public function __construct(
|
||||||
|
public array $activities = [],
|
||||||
|
public array $subactivities = [],
|
||||||
|
public array $groups = [],
|
||||||
|
public ?bool $active = true,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
public function getQuery(): Builder
|
||||||
|
{
|
||||||
|
$query = Membership::orderByRaw('member_id, activity_id, subactivity_id');
|
||||||
|
|
||||||
|
if ($this->active === true) {
|
||||||
|
$query = $query->active();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->active === false) {
|
||||||
|
$query = $query->inactive();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($this->groups)) {
|
||||||
|
$query = $query->whereIn('group_id', $this->groups);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($this->activities)) {
|
||||||
|
$query = $query->whereIn('activity_id', $this->activities);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($this->subactivities)) {
|
||||||
|
$query = $query->whereIn('subactivity_id', $this->subactivities);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,7 +14,7 @@ class SearchAction
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LengthAwarePaginator<array<string, mixed>>
|
* @return LengthAwarePaginator<int, array<string, mixed>>
|
||||||
*/
|
*/
|
||||||
public function handle(ActionRequest $request): LengthAwarePaginator
|
public function handle(ActionRequest $request): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace App\Setting;
|
||||||
|
|
||||||
use App\Group;
|
use App\Group;
|
||||||
use App\Initialize\Actions\NamiLoginCheckAction;
|
use App\Initialize\Actions\NamiLoginCheckAction;
|
||||||
use App\Nami\Actions\SettingSaveAction;
|
|
||||||
use App\Setting\Contracts\Storeable;
|
use App\Setting\Contracts\Storeable;
|
||||||
use Lorisleiva\Actions\ActionRequest;
|
use Lorisleiva\Actions\ActionRequest;
|
||||||
use Zoomyboy\LaravelNami\Api;
|
use Zoomyboy\LaravelNami\Api;
|
||||||
|
@ -12,7 +11,7 @@ use Zoomyboy\LaravelNami\Nami;
|
||||||
|
|
||||||
class NamiSettings extends LocalSettings implements Storeable
|
class NamiSettings extends LocalSettings implements Storeable
|
||||||
{
|
{
|
||||||
public int $mglnr;
|
public string $mglnr;
|
||||||
|
|
||||||
public string $password;
|
public string $password;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"cviebrock/eloquent-sluggable": "^11.0",
|
"cviebrock/eloquent-sluggable": "^11.0",
|
||||||
"doctrine/dbal": "^3.1",
|
"doctrine/dbal": "^3.1",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"inertiajs/inertia-laravel": "^1.0",
|
"inertiajs/inertia-laravel": "^2.0",
|
||||||
"laravel/framework": "^11.0",
|
"laravel/framework": "^11.0",
|
||||||
"laravel/horizon": "^5.0",
|
"laravel/horizon": "^5.0",
|
||||||
"laravel/pail": "^1.1",
|
"laravel/pail": "^1.1",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -47,8 +47,8 @@ class FormFactory extends Factory
|
||||||
'description' => EditorRequestFactory::new()->toData(),
|
'description' => EditorRequestFactory::new()->toData(),
|
||||||
'excerpt' => $this->faker->words(10, true),
|
'excerpt' => $this->faker->words(10, true),
|
||||||
'config' => ['sections' => []],
|
'config' => ['sections' => []],
|
||||||
'from' => $this->faker->dateTimeBetween('+1 week', '+4 weeks')->format('Y-m-d H:i:s'),
|
'from' => $this->faker->dateTimeBetween('+1 week', '+3 weeks')->format('Y-m-d'),
|
||||||
'to' => $this->faker->dateTimeBetween('+1 week', '+4 weeks')->format('Y-m-d H:i:s'),
|
'to' => $this->faker->dateTimeBetween('+4 week', '+6 weeks')->format('Y-m-d'),
|
||||||
'registration_from' => $this->faker->dateTimeBetween(Carbon::parse('-2 weeks'), now())->format('Y-m-d H:i:s'),
|
'registration_from' => $this->faker->dateTimeBetween(Carbon::parse('-2 weeks'), now())->format('Y-m-d H:i:s'),
|
||||||
'registration_until' => $this->faker->dateTimeBetween(now(), Carbon::parse('+2 weeks'))->format('Y-m-d H:i:s'),
|
'registration_until' => $this->faker->dateTimeBetween(now(), Carbon::parse('+2 weeks'))->format('Y-m-d H:i:s'),
|
||||||
'mail_top' => EditorRequestFactory::new()->toData(),
|
'mail_top' => EditorRequestFactory::new()->toData(),
|
||||||
|
@ -57,6 +57,8 @@ class FormFactory extends Factory
|
||||||
'is_private' => false,
|
'is_private' => false,
|
||||||
'export' => ExportData::from([]),
|
'export' => ExportData::from([]),
|
||||||
'prevention_conditions' => Condition::defaults(),
|
'prevention_conditions' => Condition::defaults(),
|
||||||
|
'zip' => $this->faker->numberBetween(1100, 99999),
|
||||||
|
'location' => $this->faker->city(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,12 @@ class MemberFactory extends Factory
|
||||||
return $this->state(['nami_id' => null]);
|
return $this->state(['nami_id' => null]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function name(string $name): self
|
||||||
|
{
|
||||||
|
[$firstname, $lastname] = explode(' ', $name);
|
||||||
|
return $this->state(compact('firstname', 'lastname'));
|
||||||
|
}
|
||||||
|
|
||||||
public function withBankAccount(BankAccountFactory $factory): self
|
public function withBankAccount(BankAccountFactory $factory): self
|
||||||
{
|
{
|
||||||
return $this->afterCreating(function ($member) use ($factory) {
|
return $this->afterCreating(function ($member) use ($factory) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Factories\Member;
|
||||||
|
|
||||||
use App\Activity;
|
use App\Activity;
|
||||||
use App\Group;
|
use App\Group;
|
||||||
|
use App\Member\Member;
|
||||||
use App\Member\Membership;
|
use App\Member\Membership;
|
||||||
use App\Subactivity;
|
use App\Subactivity;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
@ -30,6 +31,10 @@ class MembershipFactory extends Factory
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function defaults(): self {
|
||||||
|
return $this->for(Member::factory()->defaults())->for(Group::factory())->for(Activity::factory())->for(Subactivity::factory());
|
||||||
|
}
|
||||||
|
|
||||||
public function inNami(int $namiId): self
|
public function inNami(int $namiId): self
|
||||||
{
|
{
|
||||||
return $this->state(['nami_id' => $namiId]);
|
return $this->state(['nami_id' => $namiId]);
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->string('zip')->nullable()->after('name');
|
||||||
|
$table->string('location')->nullable()->after('name');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('zip');
|
||||||
|
$table->dropColumn('location');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->string('country')->nullable()->after('location');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('country');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->json('leader_conditions')->after('name')->default(json_encode(['mode' => 'all', 'ifs' => []]));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('forms', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('leader_conditions');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -9,7 +9,7 @@
|
||||||
"@editorjs/header": "^2.8.1",
|
"@editorjs/header": "^2.8.1",
|
||||||
"@editorjs/nested-list": "^1.4.2",
|
"@editorjs/nested-list": "^1.4.2",
|
||||||
"@editorjs/paragraph": "^2.11.3",
|
"@editorjs/paragraph": "^2.11.3",
|
||||||
"@inertiajs/vue3": "^1.0.14",
|
"@inertiajs/vue3": "^2.0",
|
||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@vitejs/plugin-vue": "^4.6.2",
|
"@vitejs/plugin-vue": "^4.6.2",
|
||||||
|
@ -27,8 +27,10 @@
|
||||||
"pusher-js": "^8.3.0",
|
"pusher-js": "^8.3.0",
|
||||||
"svg-sprite": "^2.0.2",
|
"svg-sprite": "^2.0.2",
|
||||||
"typescript-eslint": "^8.34.0",
|
"typescript-eslint": "^8.34.0",
|
||||||
|
"uuid": "^11.1.0",
|
||||||
"vite": "^4.5.2",
|
"vite": "^4.5.2",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-toastification": "^2.0.0-rc.5",
|
"vue-toastification": "^2.0.0-rc.5",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"wnumb": "^1.2.0"
|
"wnumb": "^1.2.0"
|
||||||
|
@ -40,6 +42,7 @@
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"postcss": "^8.4.33",
|
"postcss": "^8.4.33",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
|
"unplugin-vue-components": "^28.7.0",
|
||||||
"vue-axios": "^3.5.2"
|
"vue-axios": "^3.5.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -526,9 +529,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/config-array": {
|
"node_modules/@eslint/config-array": {
|
||||||
"version": "0.20.0",
|
"version": "0.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz",
|
||||||
"integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==",
|
"integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/object-schema": "^2.1.6",
|
"@eslint/object-schema": "^2.1.6",
|
||||||
"debug": "^4.3.1",
|
"debug": "^4.3.1",
|
||||||
|
@ -539,9 +542,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/config-helpers": {
|
"node_modules/@eslint/config-helpers": {
|
||||||
"version": "0.2.2",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.3.tgz",
|
||||||
"integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==",
|
"integrity": "sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
}
|
}
|
||||||
|
@ -599,17 +602,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/plugin-kit": {
|
"node_modules/@eslint/plugin-kit": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.2.tgz",
|
||||||
"integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==",
|
"integrity": "sha512-4SaFZCNfJqvk/kenHpI8xvN42DMaoycy4PzKc5otHxRswww1kAt82OlBuwRVLofCACCTZEcla2Ydxv8scMXaTg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint/core": "^0.14.0",
|
"@eslint/core": "^0.15.0",
|
||||||
"levn": "^0.4.1"
|
"levn": "^0.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
|
||||||
|
"version": "0.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.0.tgz",
|
||||||
|
"integrity": "sha512-b7ePw78tEWWkpgZCDYkbqDOP8dmM6qe+AOC6iuJqlq1R/0ahMAeH3qynpnqKFGkMltrp44ohV4ubGyvLX28tzw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/json-schema": "^7.0.15"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@floating-ui/core": {
|
"node_modules/@floating-ui/core": {
|
||||||
"version": "1.7.1",
|
"version": "1.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.1.tgz",
|
||||||
|
@ -688,24 +702,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@inertiajs/core": {
|
"node_modules/@inertiajs/core": {
|
||||||
"version": "1.3.0",
|
"version": "2.0.12",
|
||||||
"resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-2.0.12.tgz",
|
||||||
"integrity": "sha512-TJ8R1eUYY473m9DaKlCPRdHTdznFWTDuy5VvEzXg3t/hohbDQedLj46yn/uAqziJPEUZJrSftZzPI2NMzL9tQA==",
|
"integrity": "sha512-TxMRUcSB/w2Or9KSsldgcx49u+1xveLg7HuwRkqrs196ZrDwYRjtc984uc838vDP+dsFIz//+Tn0n7ysG/MgMQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.0",
|
"axios": "^1.8.2",
|
||||||
"deepmerge": "^4.0.0",
|
"es-toolkit": "^1.34.1",
|
||||||
"nprogress": "^0.2.0",
|
|
||||||
"qs": "^6.9.0"
|
"qs": "^6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@inertiajs/vue3": {
|
"node_modules/@inertiajs/vue3": {
|
||||||
"version": "1.3.0",
|
"version": "2.0.12",
|
||||||
"resolved": "https://registry.npmjs.org/@inertiajs/vue3/-/vue3-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@inertiajs/vue3/-/vue3-2.0.12.tgz",
|
||||||
"integrity": "sha512-GizqdCM3u4JWunit3uUbW4fEmTLKQTi1W7VvPRdrNy8XDt4Qy2cCmfFjq+aH5tHBSS3fI/ngYuhN7XvwqNaKvw==",
|
"integrity": "sha512-ruvThr3BKunFjh+EamcGilAI8RGSF/upL//E9bnchYEWFCwQtZ2NzQ0tBOFLQ+qYnaRiDjsyTa63h1R36PUmbg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@inertiajs/core": "1.3.0",
|
"@inertiajs/core": "2.0.12",
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"es-toolkit": "^1.33.0"
|
||||||
"lodash.isequal": "^4.5.0"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.0.0"
|
"vue": "^3.0.0"
|
||||||
|
@ -1764,9 +1776,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001722",
|
"version": "1.0.30001723",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz",
|
||||||
"integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==",
|
"integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1861,6 +1873,16 @@
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/clipboard": {
|
||||||
|
"version": "2.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
|
||||||
|
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
||||||
|
"dependencies": {
|
||||||
|
"good-listener": "^1.2.2",
|
||||||
|
"select": "^1.1.2",
|
||||||
|
"tiny-emitter": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cliui": {
|
"node_modules/cliui": {
|
||||||
"version": "8.0.1",
|
"version": "8.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||||
|
@ -1985,6 +2007,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/confbox": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz",
|
||||||
|
"integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/constant-case": {
|
"node_modules/constant-case": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz",
|
||||||
|
@ -2115,14 +2143,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
||||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
|
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
|
||||||
},
|
},
|
||||||
"node_modules/deepmerge": {
|
|
||||||
"version": "4.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
|
||||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/delayed-stream": {
|
"node_modules/delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
|
@ -2131,6 +2151,11 @@
|
||||||
"node": ">=0.4.0"
|
"node": ">=0.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/delegate": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
||||||
|
},
|
||||||
"node_modules/didyoumean": {
|
"node_modules/didyoumean": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
||||||
|
@ -2225,9 +2250,9 @@
|
||||||
"integrity": "sha512-m6w/cRxnFucC3dyfrB+DTNXw70SnJNv05AX6P3bZ8qkbzB1OAJTuaFrEKZBdN0YvEvTe1zvg3S344EkPAveemQ=="
|
"integrity": "sha512-m6w/cRxnFucC3dyfrB+DTNXw70SnJNv05AX6P3bZ8qkbzB1OAJTuaFrEKZBdN0YvEvTe1zvg3S344EkPAveemQ=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.166",
|
"version": "1.5.167",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.167.tgz",
|
||||||
"integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==",
|
"integrity": "sha512-LxcRvnYO5ez2bMOFpbuuVuAI5QNeY1ncVytE/KXaL6ZNfzX1yPlAO0nSOyIHx2fVAuUprMqPs/TdVhUFZy7SIQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
|
@ -2289,6 +2314,15 @@
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/es-toolkit": {
|
||||||
|
"version": "1.39.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.39.3.tgz",
|
||||||
|
"integrity": "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww==",
|
||||||
|
"workspaces": [
|
||||||
|
"docs",
|
||||||
|
"benchmarks"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.18.20",
|
"version": "0.18.20",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
|
||||||
|
@ -2520,6 +2554,12 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/exsolve": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
|
@ -2824,6 +2864,14 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/good-listener": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
||||||
|
"dependencies": {
|
||||||
|
"delegate": "^3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/gopd": {
|
"node_modules/gopd": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||||
|
@ -3137,6 +3185,23 @@
|
||||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||||
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/local-pkg": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"mlly": "^1.7.4",
|
||||||
|
"pkg-types": "^2.0.1",
|
||||||
|
"quansync": "^0.2.8"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/antfu"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/locate-path": {
|
"node_modules/locate-path": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||||
|
@ -3161,22 +3226,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
||||||
"integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q=="
|
"integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q=="
|
||||||
},
|
},
|
||||||
"node_modules/lodash.clonedeep": {
|
|
||||||
"version": "4.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
|
||||||
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
|
|
||||||
},
|
|
||||||
"node_modules/lodash.escape": {
|
"node_modules/lodash.escape": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz",
|
||||||
"integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw=="
|
"integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw=="
|
||||||
},
|
},
|
||||||
"node_modules/lodash.isequal": {
|
|
||||||
"version": "4.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
|
|
||||||
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
|
|
||||||
"deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead."
|
|
||||||
},
|
|
||||||
"node_modules/lodash.isplainobject": {
|
"node_modules/lodash.isplainobject": {
|
||||||
"version": "4.0.6",
|
"version": "4.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||||
|
@ -3308,6 +3362,35 @@
|
||||||
"node": ">=16 || 14 >=14.17"
|
"node": ">=16 || 14 >=14.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mlly": {
|
||||||
|
"version": "1.7.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",
|
||||||
|
"integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"acorn": "^8.14.0",
|
||||||
|
"pathe": "^2.0.1",
|
||||||
|
"pkg-types": "^1.3.0",
|
||||||
|
"ufo": "^1.5.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mlly/node_modules/confbox": {
|
||||||
|
"version": "0.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz",
|
||||||
|
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/mlly/node_modules/pkg-types": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"confbox": "^0.1.8",
|
||||||
|
"mlly": "^1.7.4",
|
||||||
|
"pathe": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
@ -3385,11 +3468,6 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nprogress": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
|
|
||||||
"integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA=="
|
|
||||||
},
|
|
||||||
"node_modules/nth-check": {
|
"node_modules/nth-check": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
|
||||||
|
@ -3575,6 +3653,12 @@
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pathe": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
|
@ -3628,10 +3712,21 @@
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pkg-types": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"confbox": "^0.2.1",
|
||||||
|
"exsolve": "^1.0.1",
|
||||||
|
"pathe": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.5.4",
|
"version": "8.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.5.tgz",
|
||||||
"integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==",
|
"integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
|
@ -3829,6 +3924,22 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/quansync": {
|
||||||
|
"version": "0.2.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.10.tgz",
|
||||||
|
"integrity": "sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/sponsors/antfu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/sponsors/sxzz"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/queue-microtask": {
|
"node_modules/queue-microtask": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||||
|
@ -3988,6 +4099,11 @@
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/select": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
|
||||||
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||||
|
@ -4458,6 +4574,53 @@
|
||||||
"node": ">=0.8"
|
"node": ">=0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tiny-emitter": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||||
|
},
|
||||||
|
"node_modules/tinyglobby": {
|
||||||
|
"version": "0.2.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
|
||||||
|
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"fdir": "^6.4.4",
|
||||||
|
"picomatch": "^4.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tinyglobby/node_modules/fdir": {
|
||||||
|
"version": "6.4.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||||
|
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||||
|
"dev": true,
|
||||||
|
"peerDependencies": {
|
||||||
|
"picomatch": "^3 || ^4"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"picomatch": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tinyglobby/node_modules/picomatch": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/to-regex-range": {
|
"node_modules/to-regex-range": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
@ -4548,6 +4711,101 @@
|
||||||
"typescript": ">=4.8.4 <5.9.0"
|
"typescript": ">=4.8.4 <5.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ufo": {
|
||||||
|
"version": "1.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
|
||||||
|
"integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/unplugin": {
|
||||||
|
"version": "2.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.5.tgz",
|
||||||
|
"integrity": "sha512-RyWSb5AHmGtjjNQ6gIlA67sHOsWpsbWpwDokLwTcejVdOjEkJZh7QKu14J00gDDVSh8kGH4KYC/TNBceXFZhtw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"acorn": "^8.14.1",
|
||||||
|
"picomatch": "^4.0.2",
|
||||||
|
"webpack-virtual-modules": "^0.6.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/unplugin-utils": {
|
||||||
|
"version": "0.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.2.4.tgz",
|
||||||
|
"integrity": "sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"pathe": "^2.0.2",
|
||||||
|
"picomatch": "^4.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.12.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sxzz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/unplugin-utils/node_modules/picomatch": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/unplugin-vue-components": {
|
||||||
|
"version": "28.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-28.7.0.tgz",
|
||||||
|
"integrity": "sha512-3SuWAHlTjOiZckqRBGXRdN/k6IMmKyt2Ch5/+DKwYaT321H0ItdZDvW4r8/YkEKQpN9TN3F/SZ0W342gQROC3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"chokidar": "^3.6.0",
|
||||||
|
"debug": "^4.4.1",
|
||||||
|
"local-pkg": "^1.1.1",
|
||||||
|
"magic-string": "^0.30.17",
|
||||||
|
"mlly": "^1.7.4",
|
||||||
|
"tinyglobby": "^0.2.14",
|
||||||
|
"unplugin": "^2.3.4",
|
||||||
|
"unplugin-utils": "^0.2.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/antfu"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/parser": "^7.15.8",
|
||||||
|
"@nuxt/kit": "^3.2.2",
|
||||||
|
"vue": "2 || 3"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@babel/parser": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@nuxt/kit": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/unplugin/node_modules/picomatch": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||||
|
@ -4607,6 +4865,18 @@
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/uuid": {
|
||||||
|
"version": "11.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
|
||||||
|
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
|
||||||
|
"funding": [
|
||||||
|
"https://github.com/sponsors/broofa",
|
||||||
|
"https://github.com/sponsors/ctavan"
|
||||||
|
],
|
||||||
|
"bin": {
|
||||||
|
"uuid": "dist/esm/bin/uuid"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vinyl": {
|
"node_modules/vinyl": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",
|
||||||
|
@ -4716,6 +4986,14 @@
|
||||||
"vue": "^3.0.0 || ^2.0.0"
|
"vue": "^3.0.0 || ^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-clipboard3": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-clipboard3/-/vue-clipboard3-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Q9S7dzWGax7LN5iiSPcu/K1GGm2gcBBlYwmMsUc5/16N6w90cbKow3FnPmPs95sungns4yvd9/+JhbAznECS2A==",
|
||||||
|
"dependencies": {
|
||||||
|
"clipboard": "^2.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vue-demi": {
|
"node_modules/vue-demi": {
|
||||||
"version": "0.14.10",
|
"version": "0.14.10",
|
||||||
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
|
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
|
||||||
|
@ -4792,6 +5070,12 @@
|
||||||
"vue": "^3.0.1"
|
"vue": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/webpack-virtual-modules": {
|
||||||
|
"version": "0.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
|
||||||
|
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/which": {
|
"node_modules/which": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"postcss": "^8.4.33",
|
"postcss": "^8.4.33",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
|
"unplugin-vue-components": "^28.7.0",
|
||||||
"vue-axios": "^3.5.2"
|
"vue-axios": "^3.5.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
"@editorjs/header": "^2.8.1",
|
"@editorjs/header": "^2.8.1",
|
||||||
"@editorjs/nested-list": "^1.4.2",
|
"@editorjs/nested-list": "^1.4.2",
|
||||||
"@editorjs/paragraph": "^2.11.3",
|
"@editorjs/paragraph": "^2.11.3",
|
||||||
"@inertiajs/vue3": "^1.0.14",
|
"@inertiajs/vue3": "^2.0",
|
||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@vitejs/plugin-vue": "^4.6.2",
|
"@vitejs/plugin-vue": "^4.6.2",
|
||||||
|
@ -43,8 +44,10 @@
|
||||||
"pusher-js": "^8.3.0",
|
"pusher-js": "^8.3.0",
|
||||||
"svg-sprite": "^2.0.2",
|
"svg-sprite": "^2.0.2",
|
||||||
"typescript-eslint": "^8.34.0",
|
"typescript-eslint": "^8.34.0",
|
||||||
|
"uuid": "^11.1.0",
|
||||||
"vite": "^4.5.2",
|
"vite": "^4.5.2",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-toastification": "^2.0.0-rc.5",
|
"vue-toastification": "^2.0.0-rc.5",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"wnumb": "^1.2.0"
|
"wnumb": "^1.2.0"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c20cf930f2037ddda4400dd7d35bf9ef707356eb
|
Subproject commit 47f01b3c3c98821603f3612511d713cf51a6a14c
|
|
@ -418,11 +418,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Mailgateway/Resources/MailgatewayResource.php
|
path: app/Mailgateway/Resources/MailgatewayResource.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Generic type Illuminate\\\\Pagination\\\\LengthAwarePaginator\\<int, App\\\\Member\\\\Member\\> in PHPDoc tag @return specifies 2 template types, but class Illuminate\\\\Pagination\\\\LengthAwarePaginator supports only 1\\: TValue$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Member/Actions/SearchAction.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Class Plugins\\\\Test\\\\ServiceProvider not found\\.$#"
|
message: "#^Class Plugins\\\\Test\\\\ServiceProvider not found\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
|
|
@ -31,6 +31,12 @@
|
||||||
@apply bg-yellow-500 text-yellow-100;
|
@apply bg-yellow-500 text-yellow-100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.btn-default {
|
||||||
|
@apply bg-gray-700 text-gray-300;
|
||||||
|
&:not(.disabled):hover {
|
||||||
|
@apply bg-gray-500 text-gray-100;
|
||||||
|
}
|
||||||
|
}
|
||||||
&.btn-info {
|
&.btn-info {
|
||||||
@apply bg-blue-700 text-blue-300;
|
@apply bg-blue-700 text-blue-300;
|
||||||
&:not(.disabled):hover {
|
&:not(.disabled):hover {
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
.ce-settings__button,
|
.ce-settings__button,
|
||||||
.ce-toolbar__settings-btn,
|
.ce-toolbar__settings-btn,
|
||||||
.cdx-button,
|
.cdx-button,
|
||||||
.ce-popover,
|
.ce-popover__container,
|
||||||
.ce-toolbar__plus:hover {
|
.ce-toolbar__plus:hover {
|
||||||
@apply bg-primary-700;
|
@apply bg-primary-700;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ce-inline-tool-input {
|
.cdx-search-field {
|
||||||
@apply bg-primary-700 text-primary-200 placeholder-primary-500;
|
@apply bg-primary-600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ce-block--selected {
|
.ce-block--selected {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
.custom-table {
|
.custom-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
& > thead > th {
|
& > thead > th, & > thead > tr > th {
|
||||||
@apply text-left px-6 text-gray-200 font-semibold py-3 border-gray-600 border-b;
|
@apply text-left px-6 text-gray-200 font-semibold py-3 border-gray-600 border-b;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > tr {
|
& > tr, & > tbody > tr {
|
||||||
@apply text-gray-200 transition-all duration-300 rounded hover:bg-gray-800;
|
@apply text-gray-200 transition-all duration-300 rounded hover:bg-gray-800;
|
||||||
& > td {
|
& > td {
|
||||||
@apply py-1 px-6;
|
@apply py-1 px-6;
|
||||||
|
@ -12,10 +12,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.custom-table-sm {
|
&.custom-table-sm {
|
||||||
& > thead > th {
|
& > thead > th, & > thead > tr > th {
|
||||||
@apply px-3 py-2;
|
@apply px-3 py-2;
|
||||||
}
|
}
|
||||||
& > tr {
|
& > tr, & > tbody > tr {
|
||||||
& > td {
|
& > td {
|
||||||
@apply py-1 px-3;
|
@apply py-1 px-3;
|
||||||
}
|
}
|
||||||
|
@ -23,20 +23,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.custom-table-light {
|
&.custom-table-light {
|
||||||
& > thead > th {
|
& > thead > th, & > thead > tr > th {
|
||||||
@apply border-gray-500;
|
@apply border-gray-500;
|
||||||
}
|
}
|
||||||
& > td {
|
& > tr, & > tbody > tr {
|
||||||
&:hover {
|
@apply hover:bg-gray-700;
|
||||||
@apply bg-gray-700;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
.custom-table > * {
|
|
||||||
display: table-row;
|
|
||||||
}
|
|
||||||
.custom-table > * > * {
|
|
||||||
display: table-cell;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
.v-popper__popper {
|
||||||
|
@apply max-w-lg;
|
||||||
|
}
|
||||||
|
|
||||||
.v-popper--theme-tooltip .v-popper__inner {
|
.v-popper--theme-tooltip .v-popper__inner {
|
||||||
@apply bg-primary-400 text-primary-800 px-3 py-1 text-sm;
|
@apply bg-primary-400 text-primary-800 px-3 py-1 text-sm;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6 6V2c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2h4zm2 0h4a2 2 0 0 1 2 2v4h4V2H8v4zM2 8v10h10V8H2z"/></svg>
|
After Width: | Height: | Size: 233 B |
|
@ -0,0 +1,4 @@
|
||||||
|
<svg x="0px" y="0px" viewBox="0 0 511.626 511.627" xml:space="preserve">
|
||||||
|
<path d="M392.857,292.354h-18.274c-2.669,0-4.859,0.855-6.563,2.573c-1.718,1.708-2.573,3.897-2.573,6.563v91.361 c0,12.563-4.47,23.315-13.415,32.262c-8.945,8.945-19.701,13.414-32.264,13.414H82.224c-12.562,0-23.317-4.469-32.264-13.414 c-8.945-8.946-13.417-19.698-13.417-32.262V155.31c0-12.562,4.471-23.313,13.417-32.259c8.947-8.947,19.702-13.418,32.264-13.418 h200.994c2.669,0,4.859-0.859,6.57-2.57c1.711-1.713,2.566-3.9,2.566-6.567V82.221c0-2.662-0.855-4.853-2.566-6.563 c-1.711-1.713-3.901-2.568-6.57-2.568H82.224c-22.648,0-42.016,8.042-58.102,24.125C8.042,113.297,0,132.665,0,155.313v237.542 c0,22.647,8.042,42.018,24.123,58.095c16.086,16.084,35.454,24.13,58.102,24.13h237.543c22.647,0,42.017-8.046,58.101-24.13 c16.085-16.077,24.127-35.447,24.127-58.095v-91.358c0-2.669-0.856-4.859-2.574-6.57 C397.709,293.209,395.519,292.354,392.857,292.354z"/>
|
||||||
|
<path d="M506.199,41.971c-3.617-3.617-7.905-5.424-12.85-5.424H347.171c-4.948,0-9.233,1.807-12.847,5.424 c-3.617,3.615-5.428,7.898-5.428,12.847s1.811,9.233,5.428,12.85l50.247,50.248L198.424,304.067 c-1.906,1.903-2.856,4.093-2.856,6.563c0,2.479,0.953,4.668,2.856,6.571l32.548,32.544c1.903,1.903,4.093,2.852,6.567,2.852 s4.665-0.948,6.567-2.852l186.148-186.148l50.251,50.248c3.614,3.617,7.898,5.426,12.847,5.426s9.233-1.809,12.851-5.426 c3.617-3.616,5.424-7.898,5.424-12.847V54.818C511.626,49.866,509.813,45.586,506.199,41.971z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M1.225 21.225A1.678 1.678 0 0 0 2.707 22H22.28a1.68 1.68 0 0 0 1.484-.775 1.608 1.608 0 0 0 .003-1.656L13.995 1.827a1.745 1.745 0 0 0-2.969 0l-9.8 17.742a1.603 1.603 0 0 0 0 1.656zm.859-1.143l9.82-17.773A.71.71 0 0 1 12.508 2a.73.73 0 0 1 .629.342l9.751 17.708a.626.626 0 0 1 .017.662.725.725 0 0 1-.626.288H2.708a.723.723 0 0 1-.623-.286.605.605 0 0 1-.001-.632zM13 15h-1V8h1zm-1.5 2.5a1 1 0 1 1 1 1 1.002 1.002 0 0 1-1-1z"/><path fill="none" d="M0 0h24v24H0z"/></svg>
|
After Width: | Height: | Size: 686 B |
|
@ -5,7 +5,6 @@ import VueAxios from 'vue-axios';
|
||||||
import { Plugin as FloatingVue, options as FloatingVueOptions } from './lib/floatingVue.js';
|
import { Plugin as FloatingVue, options as FloatingVueOptions } from './lib/floatingVue.js';
|
||||||
import { createPinia, PiniaVuePlugin } from 'pinia';
|
import { createPinia, PiniaVuePlugin } from 'pinia';
|
||||||
import Echo from './lib/echo.js';
|
import Echo from './lib/echo.js';
|
||||||
import requireModules from './lib/requireModules.js';
|
|
||||||
|
|
||||||
import AppLayout from './layouts/AppLayout.vue';
|
import AppLayout from './layouts/AppLayout.vue';
|
||||||
import hasModule from './mixins/hasModule.js';
|
import hasModule from './mixins/hasModule.js';
|
||||||
|
@ -47,9 +46,6 @@ createInertiaApp({
|
||||||
.mixin(hasModule)
|
.mixin(hasModule)
|
||||||
.mixin(hasFlash);
|
.mixin(hasFlash);
|
||||||
|
|
||||||
requireModules(import.meta.glob('./components/form/*.vue'), app, 'f');
|
|
||||||
requireModules(import.meta.glob('./components/ui/*.vue'), app, 'ui');
|
|
||||||
requireModules(import.meta.glob('./components/page/*.vue', {eager: true}), app, 'page');
|
|
||||||
app.component(
|
app.component(
|
||||||
'FSinglefile',
|
'FSinglefile',
|
||||||
defineAsyncComponent(() => import('!/medialibrary-helper/assets/components/SingleFile.vue'))
|
defineAsyncComponent(() => import('!/medialibrary-helper/assets/components/SingleFile.vue'))
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-vue-components
|
||||||
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
export {}
|
||||||
|
|
||||||
|
/* prettier-ignore */
|
||||||
|
declare module 'vue' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
FCheckboxesLabel: typeof import('@/components/form/CheckboxesLabel.vue')['default']
|
||||||
|
FEditor: typeof import('@/components/form/Editor.vue')['default']
|
||||||
|
FHint: typeof import('@/components/form/Hint.vue')['default']
|
||||||
|
FLabel: typeof import('@/components/form/Label.vue')['default']
|
||||||
|
FMemberFilter: typeof import('@/components/form/MemberFilter.vue')['default']
|
||||||
|
FMultipleselect: typeof import('@/components/form/Multipleselect.vue')['default']
|
||||||
|
FSaveButton: typeof import('@/components/form/SaveButton.vue')['default']
|
||||||
|
FSelect: typeof import('@/components/form/Select.vue')['default']
|
||||||
|
FSwitch: typeof import('@/components/form/Switch.vue')['default']
|
||||||
|
FText: typeof import('@/components/form/Text.vue')['default']
|
||||||
|
FTextarea: typeof import('@/components/form/Textarea.vue')['default']
|
||||||
|
PageFilter: typeof import('@/components/page/Filter.vue')['default']
|
||||||
|
PageFullHeading: typeof import('@/components/page/FullHeading.vue')['default']
|
||||||
|
PageFullHeadingBanner: typeof import('@/components/page/FullHeadingBanner.vue')['default']
|
||||||
|
PageFullLayout: typeof import('@/components/page/FullLayout.vue')['default']
|
||||||
|
PageHeader: typeof import('@/components/page/Header.vue')['default']
|
||||||
|
PageLayout: typeof import('@/components/page/Layout.vue')['default']
|
||||||
|
PagePopups: typeof import('@/components/page/Popups.vue')['default']
|
||||||
|
PageSearchModal: typeof import('@/components/page/SearchModal.vue')['default']
|
||||||
|
PageTitle: typeof import('@/components/page/Title.vue')['default']
|
||||||
|
PageToolbarButton: typeof import('@/components/page/ToolbarButton.vue')['default']
|
||||||
|
UiActionButton: typeof import('@/components/ui/ActionButton.vue')['default']
|
||||||
|
UiAgeGroups: typeof import('@/components/ui/AgeGroups.vue')['default']
|
||||||
|
UiBool: typeof import('@/components/ui/Bool.vue')['default']
|
||||||
|
UiBooleanDisplay: typeof import('@/components/ui/BooleanDisplay.vue')['default']
|
||||||
|
UiBox: typeof import('@/components/ui/Box.vue')['default']
|
||||||
|
UiButton: typeof import('@/components/ui/Button.vue')['default']
|
||||||
|
UiFilterSidebar: typeof import('@/components/ui/FilterSidebar.vue')['default']
|
||||||
|
UiIconButton: typeof import('@/components/ui/IconButton.vue')['default']
|
||||||
|
UiLabel: typeof import('@/components/ui/Label.vue')['default']
|
||||||
|
UiLoading: typeof import('@/components/ui/Loading.vue')['default']
|
||||||
|
UiMenulist: typeof import('@/components/ui/Menulist.vue')['default']
|
||||||
|
UiNote: typeof import('@/components/ui/Note.vue')['default']
|
||||||
|
UiPagination: typeof import('@/components/ui/Pagination.vue')['default']
|
||||||
|
UiPopup: typeof import('@/components/ui/Popup.vue')['default']
|
||||||
|
UiRemoteResource: typeof import('@/components/ui/RemoteResource.vue')['default']
|
||||||
|
UiRemoteSelector: typeof import('@/components/ui/RemoteSelector.vue')['default']
|
||||||
|
UiSearchPagination: typeof import('@/components/ui/SearchPagination.vue')['default']
|
||||||
|
UiSearchResult: typeof import('@/components/ui/SearchResult.vue')['default']
|
||||||
|
UiSidebar: typeof import('@/components/ui/Sidebar.vue')['default']
|
||||||
|
UiSpinner: typeof import('@/components/ui/Spinner.vue')['default']
|
||||||
|
UiSprite: typeof import('@/components/ui/Sprite.vue')['default']
|
||||||
|
UiTableToggleButton: typeof import('@/components/ui/TableToggleButton.vue')['default']
|
||||||
|
UiTabs: typeof import('@/components/ui/Tabs.vue')['default']
|
||||||
|
UiTextDisplay: typeof import('@/components/ui/TextDisplay.vue')['default']
|
||||||
|
UiTh: typeof import('@/components/ui/Th.vue')['default']
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,22 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
<div class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
||||||
<f-label v-if="label" :required="required" :value="label"></f-label>
|
<f-label v-if="label" :required="required" :value="label" />
|
||||||
<div class="relative w-full h-full">
|
<div class="relative w-full h-full">
|
||||||
<div :id="id" :class="[fieldAppearance, paddingX, paddingY]"></div>
|
<div :id="id" :class="[fieldAppearance, paddingX, paddingY]" />
|
||||||
<f-hint v-if="hint" :value="hint"></f-hint>
|
<f-hint v-if="hint" :value="hint" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ui-popup
|
<ui-popup v-if="condition !== null"
|
||||||
v-if="condition !== null"
|
|
||||||
heading="Bedingungen"
|
heading="Bedingungen"
|
||||||
@close="
|
@close="
|
||||||
condition.resolve(condition.data);
|
condition.resolve(condition.data);
|
||||||
condition = null;
|
condition = null;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<slot name="conditions" :data="condition.data" :resolve="condition.resolve" :reject="condition.reject"></slot>
|
<slot name="conditions" :data="condition.data" :resolve="condition.resolve" :reject="condition.reject" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -106,10 +105,10 @@ class ConditionTune {
|
||||||
wrap(blockContent) {
|
wrap(blockContent) {
|
||||||
this.wrapper = document.createElement('div');
|
this.wrapper = document.createElement('div');
|
||||||
|
|
||||||
var tooltip = document.createElement('div');
|
const tooltip = document.createElement('div');
|
||||||
tooltip.setAttribute('data-tooltip', '');
|
tooltip.setAttribute('data-tooltip', '');
|
||||||
|
|
||||||
var content = document.createElement('div');
|
const content = document.createElement('div');
|
||||||
content.setAttribute('data-content', '');
|
content.setAttribute('data-content', '');
|
||||||
|
|
||||||
content.appendChild(blockContent);
|
content.appendChild(blockContent);
|
||||||
|
@ -144,7 +143,7 @@ class ConditionTune {
|
||||||
'Bedingung ' +
|
'Bedingung ' +
|
||||||
this.data.ifs
|
this.data.ifs
|
||||||
.map((i) => {
|
.map((i) => {
|
||||||
var parts = [i.field];
|
const parts = [i.field];
|
||||||
|
|
||||||
if (i.comparator === 'isEqual' || i.comparator === 'isIn') {
|
if (i.comparator === 'isEqual' || i.comparator === 'isIn') {
|
||||||
parts.push('=');
|
parts.push('=');
|
||||||
|
@ -191,7 +190,7 @@ class ConditionTune {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
var tools = {
|
const tools = {
|
||||||
paragraph: {
|
paragraph: {
|
||||||
class: Paragraph,
|
class: Paragraph,
|
||||||
shortcut: 'CTRL+P',
|
shortcut: 'CTRL+P',
|
||||||
|
@ -225,7 +224,7 @@ onMounted(async () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var tunes = [];
|
const tunes = [];
|
||||||
|
|
||||||
if (props.conditions) {
|
if (props.conditions) {
|
||||||
tools.condition = {
|
tools.condition = {
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<label class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
<label class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
||||||
<f-label v-if="label" :required="false" :value="label"></f-label>
|
<f-label v-if="label" :required="false" :value="label" />
|
||||||
<div class="relative flex-none flex">
|
<div class="relative flex-none flex">
|
||||||
<div
|
<div :class="[fieldHeight, fieldAppearance, selectAppearance]"
|
||||||
:class="[fieldHeight, fieldAppearance, selectAppearance]"
|
|
||||||
class="form-select flex items-center w-full"
|
class="form-select flex items-center w-full"
|
||||||
@click="visible = !visible"
|
@click="visible = !visible"
|
||||||
v-text="`${modelValue.length} Einträge ausgewählt`"
|
v-text="`${modelValue.length} Einträge ausgewählt`"
|
||||||
></div>
|
/>
|
||||||
<div v-show="visible" class="absolute w-[max-content] z-30 max-h-[25rem] overflow-auto shadow-lg bg-gray-600 border border-gray-500 rounded-lg p-2 top-7 space-y-1">
|
<div v-show="visible" class="absolute w-[max-content] z-30 max-h-[25rem] overflow-auto shadow-lg bg-gray-600 border border-gray-500 rounded-lg p-2 top-7 space-y-1 mt-2">
|
||||||
<div v-for="(option, index) in parsedOptions" :key="index" class="flex items-center space-x-2">
|
<div v-for="(option, index) in parsedOptions" :key="index" class="flex items-center space-x-2">
|
||||||
<f-switch
|
<f-switch :id="`${id}-${index}`"
|
||||||
:id="`${id}-${index}`"
|
|
||||||
:name="`${id}-${index}`"
|
:name="`${id}-${index}`"
|
||||||
size="sm"
|
size="sm"
|
||||||
:model-value="modelValue.includes(option.id)"
|
:model-value="modelValue.includes(option.id)"
|
||||||
:value="option.id"
|
:value="option.id"
|
||||||
@update:modelValue="trigger(option, $event)"
|
@update:model-value="trigger(option, $event)"
|
||||||
></f-switch>
|
/>
|
||||||
<div class="text-sm text-gray-200" v-text="option.name"></div>
|
<div class="text-sm text-gray-200" v-text="option.name" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,7 +64,7 @@ const parsedOptions = computed(() =>
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
function trigger(option, v) {
|
function trigger(option, v) {
|
||||||
var value = JSON.parse(JSON.stringify(props.modelValue));
|
const value = JSON.parse(JSON.stringify(props.modelValue));
|
||||||
|
|
||||||
emit('update:modelValue', value.includes(option.id) ? value.filter((cv) => cv !== option.id) : [...value, option.id]);
|
emit('update:modelValue', value.includes(option.id) ? value.filter((cv) => cv !== option.id) : [...value, option.id]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<template>
|
||||||
|
<ui-popup v-for="(popup, index) in swal.popups" :key="index" :icon="popup.icon" :heading="popup.title" @close="popup.reject(popup.id)">
|
||||||
|
<div class="text-center mt-4" v-text="popup.body" />
|
||||||
|
<div class="mt-4">
|
||||||
|
<template v-for="field in popup.fields">
|
||||||
|
<f-text v-if="field.type === 'text'" :id="field.name" :key="field.name" v-model="popup.payload[field.name]" :name="field.name" :label="field.label" />
|
||||||
|
<f-select v-if="field.type === 'select'" :id="field.name" :key="field.name" v-model="popup.payload[field.name]" :name="field.name" :label="field.label" :options="field.options" />
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-center space-x-4 mt-6">
|
||||||
|
<ui-button type="button" class="btn-primary" @click.prevent="popup.resolve(popup.id)">{{ popup.confirmButton }}</ui-button>
|
||||||
|
<ui-button type="button" class="btn-default" @click.prevent="popup.reject(popup.id)">{{ popup.cancelButton }}</ui-button>
|
||||||
|
</div>
|
||||||
|
</ui-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import useSwal from '@/stores/swalStore.ts';
|
||||||
|
const swal = useSwal();
|
||||||
|
</script>
|
||||||
|
|
|
@ -1,28 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<a v-tooltip="tooltip" :href="href" :target="blank ? '_BLANK' : '_SELF'" class="inline-flex btn btn-sm">
|
<a v-tooltip="tooltip" :href="href" :target="blank ? '_BLANK' : '_SELF'" class="inline-flex btn btn-sm">
|
||||||
<ui-sprite :src="icon"></ui-sprite>
|
<ui-sprite :src="icon" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script lang="ts" setup>
|
||||||
defineProps({
|
withDefaults(defineProps<{
|
||||||
tooltip: {
|
tooltip: string;
|
||||||
required: true,
|
href?: string;
|
||||||
type: String,
|
blank?: boolean,
|
||||||
},
|
icon: string,
|
||||||
href: {
|
}>(), {href: '#', blank: false});
|
||||||
type: String,
|
|
||||||
default: () => '#',
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
blank: {
|
|
||||||
type: Boolean,
|
|
||||||
default: () => false,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
icon: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<button v-bind="$attrs" class="btn btn-primary relative group">
|
<button v-bind="$attrs" class="btn btn-primary relative group">
|
||||||
<div :class="{hidden: !isLoading, flex: isLoading}" class="absolute items-center top-0 h-full left-0 ml-2">
|
<div :class="{hidden: !isLoading, flex: isLoading}" class="absolute items-center top-0 h-full left-0 ml-2">
|
||||||
<ui-spinner class="border-primary-400 w-6 h-6 group-hover:border-primary-200"></ui-spinner>
|
<ui-spinner class="border-primary-400 w-6 h-6 group-hover:border-primary-200" />
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot />
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {menuStore} from '../../stores/menuStore.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: function () {
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
isLoading: {
|
isLoading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
data: function () {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="fixed z-40 top-0 left-0 w-full h-full flex items-center justify-center p-6 bg-black/60 backdrop-blur-sm">
|
<div class="fixed z-40 top-0 left-0 w-full h-full flex items-center justify-center p-6 bg-black/60 backdrop-blur-sm">
|
||||||
<div
|
<div class="relative rounded-lg p-8 bg-zinc-800 shadow-2xl shadow-black border border-zinc-700 border-solid w-full max-h-full flex flex-col overflow-auto"
|
||||||
class="relative rounded-lg p-8 bg-zinc-800 shadow-2xl shadow-black border border-zinc-700 border-solid w-full max-h-full flex flex-col overflow-auto"
|
|
||||||
:class="full ? 'h-full' : innerWidth"
|
:class="full ? 'h-full' : innerWidth"
|
||||||
>
|
>
|
||||||
<div class="absolute top-0 right-0 mt-6 mr-6 flex space-x-6">
|
<div class="absolute top-0 right-0 mt-6 mr-6 flex space-x-6">
|
||||||
<slot name="actions"></slot>
|
<slot name="actions" />
|
||||||
<a href="#" @click.prevent="$emit('close')">
|
<a href="#" @click.prevent="$emit('close')">
|
||||||
<ui-sprite src="close" class="text-zinc-400 w-6 h-6"></ui-sprite>
|
<ui-sprite src="close" class="text-zinc-400 w-6 h-6" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h3 v-if="heading" class="font-semibold text-primary-200 text-xl" v-html="heading"></h3>
|
<div class="flex justify-center">
|
||||||
|
<ui-sprite v-if="icon" class="text-yellow-700 size-28" :src="icon" />
|
||||||
|
</div>
|
||||||
|
<h3 v-if="heading" class="font-semibold text-primary-200 text-xl" :class="{'text-center mt-5': icon !== null}" v-html="heading" />
|
||||||
<div class="text-primary-100 group is-popup grow flex flex-col">
|
<div class="text-primary-100 group is-popup grow flex flex-col">
|
||||||
<suspense>
|
<suspense>
|
||||||
<div>
|
<div>
|
||||||
<slot></slot>
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<template #fallback>
|
<template #fallback>
|
||||||
<ui-loading></ui-loading>
|
<ui-loading />
|
||||||
</template>
|
</template>
|
||||||
</suspense>
|
</suspense>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,21 +27,14 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts" setup>
|
||||||
export default {
|
defineEmits<{
|
||||||
props: {
|
close: [],
|
||||||
heading: {
|
}>();
|
||||||
type: String,
|
withDefaults(defineProps<{
|
||||||
default: () => '',
|
heading?: string,
|
||||||
},
|
innerWidth?: string,
|
||||||
innerWidth: {
|
full?: boolean,
|
||||||
default: () => 'max-w-xl',
|
icon?: string|null,
|
||||||
type: String,
|
}>(), {innerWidth: 'max-w-xl', full: false, heading: '', icon: null});
|
||||||
},
|
|
||||||
full: {
|
|
||||||
type: Boolean,
|
|
||||||
default: () => false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<ui-popup v-if="selecting !== false" heading="Resource auswählen" @close="selecting = false">
|
<ui-popup v-if="selecting !== false" heading="Resource auswählen" @close="selecting = false">
|
||||||
<ui-remote-selector :value="selecting" @input="set"></ui-remote-selector>
|
<ui-remote-selector :value="selecting" @input="set" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<label class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
<label class="flex flex-col group" :for="id" :class="sizeClass(size)">
|
||||||
<f-label v-if="label" :required="false" :value="label"></f-label>
|
<f-label v-if="label" :required="false" :value="label" />
|
||||||
<div class="relative flex-none flex">
|
<div class="relative flex-none flex">
|
||||||
<div class="w-full flex flex-col justify-center" :class="[fieldHeight, fieldAppearance, paddingX]" @click.prevent="selecting = modelValue === null ? null : {...modelValue}">
|
<div class="w-full flex flex-col justify-center" :class="[fieldHeight, fieldAppearance, paddingX]" @click.prevent="selecting = modelValue === null ? null : {...modelValue}">
|
||||||
<div v-if="modelValue !== null" v-text="modelValue.resource"></div>
|
<div v-if="modelValue !== null" v-text="modelValue.resource" />
|
||||||
<div v-else>Datei auswählen</div>
|
<div v-else>Datei auswählen</div>
|
||||||
</div>
|
</div>
|
||||||
<f-hint v-if="hint" :value="hint"></f-hint>
|
<f-hint v-if="hint" :value="hint" />
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,38 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 border-gray-500 group-[.is-popup]:border-zinc-500 mb-3">
|
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 border-gray-500 group-[.is-popup]:border-zinc-500 mb-3">
|
||||||
<div class="flex space-x-1 px-2">
|
<div class="flex space-x-1 px-2">
|
||||||
<a
|
<a v-for="(item, index) in entries" :key="index" href="#" class="rounded-t-lg py-1 px-3 text-zinc-300"
|
||||||
v-for="(item, index) in entries"
|
:class="index === modelValue ? `bg-gray-700 group-[.is-popup]:bg-zinc-600` : ''" @click.prevent="openMenu(index)"
|
||||||
:key="index"
|
|
||||||
href="#"
|
|
||||||
class="rounded-t-lg py-1 px-3 text-zinc-300"
|
|
||||||
:class="index === modelValue ? `bg-gray-700 group-[.is-popup]:bg-zinc-600` : ''"
|
|
||||||
@click.prevent="openMenu(index)"
|
|
||||||
v-text="item.title"
|
v-text="item.title"
|
||||||
></a>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts" setup>
|
||||||
export default {
|
defineProps<{
|
||||||
props: {
|
modelValue: number,
|
||||||
modelValue: {
|
entries: {title: string}[]
|
||||||
type: Number,
|
}>();
|
||||||
required: true,
|
|
||||||
},
|
const emits = defineEmits<{
|
||||||
entries: {
|
'update:modelValue': [number],
|
||||||
required: true,
|
}>();
|
||||||
validator: function (entries) {
|
|
||||||
return entries.filter((e) => e.title === undefined || typeof e.title !== 'string' || e.title.length === 0).length === 0;
|
function openMenu(index: number) {
|
||||||
},
|
emits('update:modelValue', index);
|
||||||
},
|
}
|
||||||
},
|
|
||||||
emits: ['update:modelValue'],
|
|
||||||
methods: {
|
|
||||||
openMenu(index) {
|
|
||||||
this.$emit('update:modelValue', index);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { Axios } from 'axios';
|
||||||
|
import { inject } from 'vue';
|
||||||
|
|
||||||
|
export default function() {
|
||||||
|
const axios = inject<Axios>('axios');
|
||||||
|
|
||||||
|
async function download(url: string, payload: Record<string, string>) {
|
||||||
|
const payloadString = btoa(encodeURIComponent(JSON.stringify(payload)));
|
||||||
|
await axios.get(`${url}?payload=${payloadString}&validate=1`);
|
||||||
|
window.open(`${url}?payload=${payloadString}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return { download };
|
||||||
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3"></v-notification>
|
<v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3" />
|
||||||
|
|
||||||
<!-- ******************************** Sidebar ******************************** -->
|
<!-- ******************************** Sidebar ******************************** -->
|
||||||
<div
|
<div class="fixed z-40 bg-gray-800 p-6 w-56 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all"
|
||||||
class="fixed z-40 bg-gray-800 p-6 w-56 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all"
|
|
||||||
:class="{
|
:class="{
|
||||||
'-left-[14rem]': !menuStore.isShifted,
|
'-left-[14rem]': !menuStore.isShifted,
|
||||||
'left-0': menuStore.isShifted,
|
'left-0': menuStore.isShifted,
|
||||||
|
@ -29,13 +28,15 @@
|
||||||
<v-link icon="logout" href="/logout" @click.prevent="$inertia.post('/logout')">Abmelden</v-link>
|
<v-link icon="logout" href="/logout" @click.prevent="$inertia.post('/logout')">Abmelden</v-link>
|
||||||
</div>
|
</div>
|
||||||
<a v-if="menuStore.hideable" href="#" class="absolute right-0 top-0 mr-2 mt-2" @click.prevent="menuStore.hide()">
|
<a v-if="menuStore.hideable" href="#" class="absolute right-0 top-0 mr-2 mt-2" @click.prevent="menuStore.hide()">
|
||||||
<ui-sprite src="close" class="w-5 h-5 text-gray-300"></ui-sprite>
|
<ui-sprite src="close" class="w-5 h-5 text-gray-300" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot></slot>
|
<page-popups />
|
||||||
|
|
||||||
<page-search-modal v-if="searchVisible" @close="searchVisible = false"></page-search-modal>
|
<slot />
|
||||||
|
|
||||||
|
<page-search-modal v-if="searchVisible" @close="searchVisible = false" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import {paramCase} from 'change-case';
|
|
||||||
import {defineAsyncComponent} from 'vue';
|
|
||||||
|
|
||||||
export default function (context, app, prefix) {
|
|
||||||
for (const file in context) {
|
|
||||||
let componentName = paramCase(`${prefix}${file.replace(/^.*\/(.*?)\.vue$/g, '$1')}`);
|
|
||||||
|
|
||||||
app.component(componentName, typeof context[file] === 'function' ? defineAsyncComponent(context[file]) : context[file].default);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
import { defineStore } from 'pinia';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
type Payload = Record<string, string|null>;
|
||||||
|
|
||||||
|
interface Popup {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
body: string;
|
||||||
|
icon: string|null;
|
||||||
|
confirmButton: string;
|
||||||
|
cancelButton: string;
|
||||||
|
resolve: (id: string) => void;
|
||||||
|
reject: (id: string) => void;
|
||||||
|
fields: SwalField[];
|
||||||
|
payload: Payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SwalField {
|
||||||
|
name: string;
|
||||||
|
label: string;
|
||||||
|
required: boolean;
|
||||||
|
type: 'select' | 'text';
|
||||||
|
options: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineStore('swal', {
|
||||||
|
state: () => ({
|
||||||
|
popups: [] as Popup[],
|
||||||
|
}),
|
||||||
|
actions: {
|
||||||
|
confirm(title: string, body: string): Promise<void> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
new Promise<string>((resolve, reject) => {
|
||||||
|
this.popups.push({
|
||||||
|
title,
|
||||||
|
body,
|
||||||
|
confirmButton: 'Okay',
|
||||||
|
cancelButton: 'Abbrechen',
|
||||||
|
resolve,
|
||||||
|
reject,
|
||||||
|
id: uuidv4(),
|
||||||
|
icon: 'warning-triangle-light',
|
||||||
|
fields: [],
|
||||||
|
payload: {},
|
||||||
|
});
|
||||||
|
}).then((id) => {
|
||||||
|
this.remove(id);
|
||||||
|
resolve();
|
||||||
|
}).catch((id) => {
|
||||||
|
this.remove(id);
|
||||||
|
reject();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
ask(title: string, body: string, fields: SwalField[] = []): Promise<Payload> {
|
||||||
|
return new Promise<Payload>((resolve, reject) => {
|
||||||
|
new Promise<string>((resolve, reject) => {
|
||||||
|
const payload: Payload = {};
|
||||||
|
fields.forEach(f => payload[f.name] = null);
|
||||||
|
this.popups.push({
|
||||||
|
title,
|
||||||
|
body,
|
||||||
|
confirmButton: 'Okay',
|
||||||
|
cancelButton: 'Abbrechen',
|
||||||
|
resolve,
|
||||||
|
reject,
|
||||||
|
id: uuidv4(),
|
||||||
|
icon: 'warning-triangle-light',
|
||||||
|
fields: fields,
|
||||||
|
payload: payload,
|
||||||
|
});
|
||||||
|
}).then((id) => {
|
||||||
|
const p = this.find(id)?.payload;
|
||||||
|
this.remove(id);
|
||||||
|
resolve(p || {});
|
||||||
|
}).catch((id) => {
|
||||||
|
this.remove(id);
|
||||||
|
reject();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id: string) {
|
||||||
|
this.popups = this.popups.filter(p => p.id !== id);
|
||||||
|
},
|
||||||
|
|
||||||
|
find(id: string): Popup|undefined {
|
||||||
|
return this.popups.find(p => p.id === id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
|
@ -1,27 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<page-layout>
|
||||||
<template #right>
|
<template #right>
|
||||||
<f-save-button form="actionform"></f-save-button>
|
<f-save-button form="actionform" />
|
||||||
</template>
|
</template>
|
||||||
<form id="actionform" class="grow p-3" @submit.prevent="submit">
|
<form id="actionform" class="grow p-3" @submit.prevent="submit">
|
||||||
<div class="flex space-x-3">
|
<div class="flex space-x-3">
|
||||||
<f-select
|
<f-select :model-value="meta.activity_id"
|
||||||
:model-value="meta.activity_id"
|
|
||||||
:options="props.activities"
|
:options="props.activities"
|
||||||
label="Tätigkeit"
|
label="Tätigkeit"
|
||||||
size="sm"
|
size="sm"
|
||||||
name="activity_id"
|
name="activity_id"
|
||||||
@update:model-value="meta = {...meta, activity_id: $event, subactivity_id: null}"
|
@update:model-value="meta = {...meta, activity_id: $event, subactivity_id: null}"
|
||||||
></f-select>
|
/>
|
||||||
<f-select v-model="meta.subactivity_id" :options="props.subactivities[meta.activity_id]" name="subactivity_id" label="Untertätigkeit" size="sm"></f-select>
|
<f-select v-model="meta.subactivity_id" :options="props.subactivities[meta.activity_id]" name="subactivity_id" label="Untertätigkeit" size="sm" />
|
||||||
<f-select v-model="meta.group_id" :options="props.groups" label="Gruppierung" size="sm" name="group_id"></f-select>
|
<f-select v-model="meta.group_id" :options="props.groups" label="Gruppierung" size="sm" name="group_id" />
|
||||||
<f-text id="search_text" v-model="searchText" label="Suchen …" size="sm"></f-text>
|
<f-text id="search_text" v-model="searchText" label="Suchen …" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
<div class="grid gap-2 grid-cols-6 mt-4">
|
<div class="grid gap-2 grid-cols-6 mt-4">
|
||||||
<f-switch v-for="member in members.hits" :id="`member-${member.id}`" :key="member.id" v-model="selected" :value="member.id" :label="member.fullname" size="sm"></f-switch>
|
<f-switch v-for="member in members.hits" :id="`member-${member.id}`" :key="member.id" v-model="selected" :value="member.id" :label="member.fullname" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-search-pagination class="mt-4" :value="members" @reload="reloadReal($event)"></ui-search-pagination>
|
<ui-search-pagination class="mt-4" :value="members" @reload="reloadReal($event)" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
|
|
|
@ -4,40 +4,38 @@
|
||||||
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
|
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<f-save-button form="actionform"></f-save-button>
|
<f-save-button form="actionform" />
|
||||||
</template>
|
</template>
|
||||||
<form id="actionform" class="grow p-3" @submit.prevent="submit">
|
<form id="actionform" class="grow p-3" @submit.prevent="submit">
|
||||||
<ui-popup heading="Neue Untertätigkeit" v-if="mode === 'edit' && currentSubactivity !== null" @close="currentSubactivity = null">
|
<ui-popup v-if="mode === 'edit' && currentSubactivity !== null" heading="Neue Untertätigkeit" @close="currentSubactivity = null">
|
||||||
<subactivity-form class="mt-4" v-if="currentSubactivity" :value="currentSubactivity" @stored="reloadSubactivities" @updated="mergeSubactivity"></subactivity-form>
|
<subactivity-form v-if="currentSubactivity" class="mt-4" :value="currentSubactivity" @stored="reloadSubactivities" @updated="mergeSubactivity" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<div class="flex space-x-3">
|
<div class="flex space-x-3">
|
||||||
<f-text id="name" v-model="inner.name" label="Name" required></f-text>
|
<f-text id="name" v-model="inner.name" label="Name" required />
|
||||||
<f-switch v-model="inner.is_filterable" name="is_filterable" id="is_filterable" label="Filterbar"></f-switch>
|
<f-switch id="is_filterable" v-model="inner.is_filterable" name="is_filterable" label="Filterbar" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-3 items-center mt-6 mb-2">
|
<div class="flex space-x-3 items-center mt-6 mb-2">
|
||||||
<f-checkboxes-label>Untertätigkeiten</f-checkboxes-label>
|
<f-checkboxes-label>Untertätigkeiten</f-checkboxes-label>
|
||||||
<ui-icon-button icon="plus" v-if="mode === 'edit'" @click.prevent="currentSubactivity = inner.subactivity_model">Neu</ui-icon-button>
|
<ui-icon-button v-if="mode === 'edit'" icon="plus" @click.prevent="currentSubactivity = inner.subactivity_model">Neu</ui-icon-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid gap-2 sm:grid-cols-2 md:grid-cols-4">
|
<div class="grid gap-2 sm:grid-cols-2 md:grid-cols-4">
|
||||||
<div v-for="option in subactivities" class="flex items-center space-x-2">
|
<div v-for="option in subactivities" class="flex items-center space-x-2">
|
||||||
<a
|
<a v-if="mode === 'edit'"
|
||||||
href="#"
|
href="#"
|
||||||
v-if="mode === 'edit'"
|
|
||||||
@click.prevent="currentSubactivity = option"
|
|
||||||
class="transition hover:bg-yellow-600 group w-5 h-5 rounded-full flex items-center justify-center flex-none"
|
class="transition hover:bg-yellow-600 group w-5 h-5 rounded-full flex items-center justify-center flex-none"
|
||||||
|
@click.prevent="currentSubactivity = option"
|
||||||
>
|
>
|
||||||
<ui-sprite src="pencil" class="text-yellow-800 w-3 h-3 group-hover:text-yellow-200 transition"></ui-sprite>
|
<ui-sprite src="pencil" class="text-yellow-800 w-3 h-3 group-hover:text-yellow-200 transition" />
|
||||||
</a>
|
</a>
|
||||||
<f-switch
|
<f-switch :id="`subactivities-${option.id}`"
|
||||||
inline
|
|
||||||
size="sm"
|
|
||||||
:key="option.id"
|
:key="option.id"
|
||||||
v-model="inner.subactivities"
|
v-model="inner.subactivities"
|
||||||
|
inline
|
||||||
|
size="sm"
|
||||||
name="subactivities[]"
|
name="subactivities[]"
|
||||||
:id="`subactivities-${option.id}`"
|
|
||||||
:value="option.id"
|
:value="option.id"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
></f-switch>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -49,6 +47,11 @@ import {defineAsyncComponent} from 'vue';
|
||||||
import {useToast} from 'vue-toastification';
|
import {useToast} from 'vue-toastification';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
props: {
|
||||||
|
data: {},
|
||||||
|
meta: {},
|
||||||
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
|
@ -63,11 +66,6 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
|
||||||
data: {},
|
|
||||||
meta: {},
|
|
||||||
},
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
'subactivity-form': defineAsyncComponent(() => import('./SubactivityForm.vue')),
|
'subactivity-form': defineAsyncComponent(() => import('./SubactivityForm.vue')),
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<page-toolbar-button :href="meta.links.create" color="primary" icon="plus">Tätigkeit erstellen</page-toolbar-button>
|
<page-toolbar-button :href="meta.links.create" color="primary" icon="plus">Tätigkeit erstellen</page-toolbar-button>
|
||||||
<page-toolbar-button :href="meta.links.membership_masslist" color="primary" icon="pencil">Mitgliedschaften zuweisen</page-toolbar-button>
|
<page-toolbar-button :href="meta.links.membership_masslist" color="primary" icon="pencil">Mitgliedschaften zuweisen</page-toolbar-button>
|
||||||
|
<page-toolbar-button :href="meta.links.membership_index" color="primary" icon="eye">Mitgliedschaften anschauen</page-toolbar-button>
|
||||||
</template>
|
</template>
|
||||||
<ui-popup v-if="deleting !== null" heading="Bitte bestätigen" @close="deleting = null">
|
<ui-popup v-if="deleting !== null" heading="Bitte bestätigen" @close="deleting = null">
|
||||||
<div>
|
<div>
|
||||||
|
@ -16,22 +17,22 @@
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm table">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm table">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr v-for="(activity, index) in data" :key="index">
|
<tr v-for="(activity, index) in data" :key="index">
|
||||||
<td v-text="activity.name"></td>
|
<td v-text="activity.name" />
|
||||||
<td>
|
<td>
|
||||||
<div class="flex space-x-1">
|
<div class="flex space-x-1">
|
||||||
<i-link v-tooltip="`Bearbeiten`" :href="activity.links.edit" class="inline-flex btn btn-warning btn-sm"><ui-sprite src="pencil"></ui-sprite></i-link>
|
<i-link v-tooltip="`Bearbeiten`" :href="activity.links.edit" class="inline-flex btn btn-warning btn-sm"><ui-sprite src="pencil" /></i-link>
|
||||||
<a v-tooltip="`Entfernen`" href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="deleting = activity"><ui-sprite src="trash"></ui-sprite></a>
|
<a v-tooltip="`Entfernen`" href="#" class="inline-flex btn btn-danger btn-sm" @click.prevent="deleting = activity"><ui-sprite src="trash" /></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-pagination class="mt-4" :value="meta" :only="['data']"></ui-pagination>
|
<ui-pagination class="mt-4" :value="meta" :only="['data']" />
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<page-layout>
|
||||||
<form target="_BLANK" class="max-w-4xl w-full mx-auto gap-6 grid-cols-2 grid p-6">
|
<form target="_BLANK" class="max-w-4xl w-full mx-auto gap-6 grid-cols-2 grid p-6">
|
||||||
<f-text id="eventName" v-model="values.eventName" class="col-span-2" label="Veranstaltungs-Name" required></f-text>
|
<f-text id="eventName" v-model="values.eventName" class="col-span-2" label="Veranstaltungs-Name" required />
|
||||||
<f-text id="dateFrom" v-model="values.dateFrom" type="date" label="Datum von" required></f-text>
|
<f-text id="dateFrom" v-model="values.dateFrom" type="date" label="Datum von" required />
|
||||||
<f-text id="dateUntil" v-model="values.dateUntil" type="date" label="Datum bis" required></f-text>
|
<f-text id="dateUntil" v-model="values.dateUntil" type="date" label="Datum bis" required />
|
||||||
|
|
||||||
<f-text id="zipLocation" v-model="values.zipLocation" label="PLZ / Ort" required></f-text>
|
<f-text id="zipLocation" v-model="values.zipLocation" label="PLZ / Ort" required />
|
||||||
<f-select id="country" v-model="values.country" :options="countries" name="country" label="Land" required></f-select>
|
<f-select id="country" v-model="values.country" :options="countries" name="country" label="Land" required />
|
||||||
|
|
||||||
<div class="border-gray-200 shadow shadow-primary-700 p-3 shadow-[0_0_4px_gray] col-span-2">
|
<div class="border-gray-200 shadow shadow-primary-700 p-3 shadow-[0_0_4px_gray] col-span-2">
|
||||||
<f-text id="search_text" ref="searchInput" v-model="searchString" class="col-span-2" label="Suchen …" size="sm" @keypress.enter.prevent="onSubmitFirstMemberResult"></f-text>
|
<f-text id="search_text" ref="searchInput" v-model="searchString" class="col-span-2" label="Suchen …" size="sm" @keypress.enter.prevent="onSubmitFirstMemberResult" />
|
||||||
<div class="mt-2 grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2 col-span-2">
|
<div class="mt-2 grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2 col-span-2">
|
||||||
<f-switch
|
<f-switch v-for="member in results.hits"
|
||||||
v-for="member in results.hits"
|
|
||||||
:id="`members-${member.id}`"
|
:id="`members-${member.id}`"
|
||||||
:key="member.id"
|
:key="member.id"
|
||||||
v-model="values.members"
|
v-model="values.members"
|
||||||
|
@ -22,21 +21,22 @@
|
||||||
size="sm"
|
size="sm"
|
||||||
inline
|
inline
|
||||||
@keypress.enter.prevent="onSubmitMemberResult(member)"
|
@keypress.enter.prevent="onSubmitMemberResult(member)"
|
||||||
></f-switch>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button v-for="(compiler, index) in compilers" :key="index" class="btn btn-primary mt-3 inline-block" @click.prevent="submit(compiler.class)" v-text="compiler.title"></button>
|
<button v-for="(compiler, index) in compilers" :key="index" class="btn btn-primary mt-3 inline-block" @click.prevent="download('/contribution-generate', {...values, type: compiler.id})" v-text="`Für ${compiler.name} erstellen`" />
|
||||||
</form>
|
</form>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="js" setup>
|
<script lang="js" setup>
|
||||||
import { ref, inject } from 'vue';
|
import { ref } from 'vue';
|
||||||
import useSearch from '../../composables/useSearch.js';
|
import useSearch from '../../composables/useSearch.js';
|
||||||
const axios = inject('axios');
|
import useDownloads from '@/composables/useDownloads.ts';
|
||||||
|
|
||||||
const { searchString, results, clearSearch } = useSearch(['birthday IS NOT NULL', 'address IS NOT EMPTY']);
|
const { searchString, results, clearSearch } = useSearch(['birthday IS NOT NULL', 'address IS NOT EMPTY']);
|
||||||
|
const {download} = useDownloads();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {},
|
data: {},
|
||||||
|
@ -56,12 +56,6 @@ const values = ref({
|
||||||
...props.data,
|
...props.data,
|
||||||
});
|
});
|
||||||
|
|
||||||
async function submit(compiler) {
|
|
||||||
values.value.type = compiler;
|
|
||||||
await axios.post('/contribution-validate', values.value);
|
|
||||||
var payload = btoa(encodeURIComponent(JSON.stringify(values.value)));
|
|
||||||
window.open(`/contribution-generate?payload=${payload}`);
|
|
||||||
}
|
|
||||||
function onSubmitMemberResult(selected) {
|
function onSubmitMemberResult(selected) {
|
||||||
if (values.value.members.find((m) => m === selected.id) !== undefined) {
|
if (values.value.members.find((m) => m === selected.id) !== undefined) {
|
||||||
values.value.members = values.value.members.filter((m) => m !== selected.id);
|
values.value.members = values.value.members.filter((m) => m !== selected.id);
|
||||||
|
|
|
@ -1,54 +1,49 @@
|
||||||
<template>
|
<template>
|
||||||
<ui-note v-if="locked" class="mt-2" type="danger">
|
<ui-note v-if="locked" class="mt-2" type="danger">
|
||||||
Dieses Formular wurde bereits bearbeitet.<br />
|
Dieses Formular wurde bereits bearbeitet.<br>
|
||||||
Bitte speichere es erst ab und editiere dann die Bedingungen.
|
Bitte speichere es erst ab und editiere dann die Bedingungen.
|
||||||
</ui-note>
|
</ui-note>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<f-select :id="`mode-${id}`" :name="`mode-${id}`" :model-value="modelValue.mode" :options="modeOptions" label="Modus" @update:model-value="changeMode"></f-select>
|
<f-select :id="`mode-${id}`" :name="`mode-${id}`" :model-value="modelValue.mode" :options="modeOptions" label="Modus" @update:model-value="changeMode" />
|
||||||
|
|
||||||
<ui-icon-button class="mt-4 mb-2" icon="plus" @click="addCondition">Bedingung einfügen</ui-icon-button>
|
<ui-icon-button class="mt-4 mb-2" icon="plus" @click="addCondition">Bedingung einfügen</ui-icon-button>
|
||||||
|
|
||||||
<div v-for="(condition, index) in modelValue.ifs" :key="index" class="grid grid-cols-[1fr_1fr_1fr_max-content] gap-2">
|
<div v-for="(condition, index) in modelValue.ifs" :key="index" class="grid grid-cols-[1fr_1fr_1fr_max-content] gap-2">
|
||||||
<f-select
|
<f-select :id="`field-${index}-${id}`"
|
||||||
:id="`field-${index}-${id}`"
|
|
||||||
:model-value="condition.field"
|
:model-value="condition.field"
|
||||||
:options="fieldOptions"
|
:options="fieldOptions"
|
||||||
:name="`field-${index}-${id}`"
|
:name="`field-${index}-${id}`"
|
||||||
label="Feld"
|
label="Feld"
|
||||||
@update:model-value="update(index, 'field', $event)"
|
@update:model-value="update(index, 'field', $event)"
|
||||||
></f-select>
|
/>
|
||||||
<f-select
|
<f-select :id="`comparator-${index}-${id}`"
|
||||||
:id="`comparator-${index}-${id}`"
|
|
||||||
:options="comparatorOptions"
|
:options="comparatorOptions"
|
||||||
:model-value="condition.comparator"
|
:model-value="condition.comparator"
|
||||||
:name="`comparator-${index}-${id}`"
|
:name="`comparator-${index}-${id}`"
|
||||||
label="Vergleich"
|
label="Vergleich"
|
||||||
@update:model-value="update(index, 'comparator', $event)"
|
@update:model-value="update(index, 'comparator', $event)"
|
||||||
></f-select>
|
/>
|
||||||
<f-select
|
<f-select v-if="condition.field && ['isEqual', 'isNotEqual'].includes(condition.comparator) && ['RadioField', 'DropdownField', 'GroupField'].includes(getField(condition.field).type)"
|
||||||
v-if="condition.field && ['isEqual', 'isNotEqual'].includes(condition.comparator) && ['RadioField', 'DropdownField', 'GroupField'].includes(getField(condition.field).type)"
|
|
||||||
:id="`value-${index}-${id}`"
|
:id="`value-${index}-${id}`"
|
||||||
v-model="condition.value"
|
v-model="condition.value"
|
||||||
:options="getOptions(condition.field)"
|
:options="getOptions(condition.field)"
|
||||||
:name="`value-${index}-${id}`"
|
:name="`value-${index}-${id}`"
|
||||||
label="Wert"
|
label="Wert"
|
||||||
></f-select>
|
/>
|
||||||
<f-multipleselect
|
<f-multipleselect v-if="condition.field && ['isIn', 'isNotIn'].includes(condition.comparator) && ['RadioField', 'DropdownField', 'GroupField'].includes(getField(condition.field).type)"
|
||||||
v-if="condition.field && ['isIn', 'isNotIn'].includes(condition.comparator) && ['RadioField', 'DropdownField', 'GroupField'].includes(getField(condition.field).type)"
|
|
||||||
:id="`value-${index}-${id}`"
|
:id="`value-${index}-${id}`"
|
||||||
v-model="condition.value"
|
v-model="condition.value"
|
||||||
:options="getOptions(condition.field)"
|
:options="getOptions(condition.field)"
|
||||||
label="Wert"
|
label="Wert"
|
||||||
></f-multipleselect>
|
/>
|
||||||
<f-switch
|
<f-switch v-if="condition.field && condition.comparator && ['CheckboxField'].includes(getField(condition.field).type)"
|
||||||
v-if="condition.field && condition.comparator && ['CheckboxField'].includes(getField(condition.field).type)"
|
|
||||||
:id="`value-${index}-${id}`"
|
:id="`value-${index}-${id}`"
|
||||||
v-model="condition.value"
|
v-model="condition.value"
|
||||||
:name="`value-${index}-${id}`"
|
:name="`value-${index}-${id}`"
|
||||||
label="Wert"
|
label="Wert"
|
||||||
></f-switch>
|
/>
|
||||||
<ui-action-button tooltip="Löschen" icon="trash" class="btn-danger self-end h-8" @click="remove(index)"></ui-action-button>
|
<ui-action-button tooltip="Löschen" icon="trash" class="btn-danger self-end h-8" @click="remove(index)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -103,9 +98,9 @@ function changeMode(mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update(index, key, value) {
|
function update(index, key, value) {
|
||||||
var inner = {...props.modelValue};
|
const inner = {...props.modelValue};
|
||||||
if (key === 'comparator') {
|
if (key === 'comparator') {
|
||||||
var old = inner.ifs[index];
|
const old = inner.ifs[index];
|
||||||
inner.ifs[index] = {
|
inner.ifs[index] = {
|
||||||
field: old.field,
|
field: old.field,
|
||||||
comparator: value,
|
comparator: value,
|
||||||
|
@ -113,7 +108,6 @@ function update(index, key, value) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (key === 'field') {
|
if (key === 'field') {
|
||||||
var old = inner.ifs[index];
|
|
||||||
inner.ifs[index] = {
|
inner.ifs[index] = {
|
||||||
field: value,
|
field: value,
|
||||||
comparator: null,
|
comparator: null,
|
||||||
|
|
|
@ -5,97 +5,81 @@
|
||||||
<page-toolbar-button color="primary" icon="plus" @click.prevent="create">Veranstaltung erstellen</page-toolbar-button>
|
<page-toolbar-button color="primary" icon="plus" @click.prevent="create">Veranstaltung erstellen</page-toolbar-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<ui-popup v-if="deleting !== null" :heading="`Veranstaltung ${deleting.name} löschen?`" @close="deleting = null">
|
|
||||||
<div>
|
|
||||||
<p class="mt-4">Diese Veranstaltung löschen?</p>
|
|
||||||
<div class="grid grid-cols-2 gap-3 mt-6">
|
|
||||||
<a
|
|
||||||
href="#"
|
|
||||||
class="text-center btn btn-danger"
|
|
||||||
@click.prevent="
|
|
||||||
remove(deleting);
|
|
||||||
deleting = null;
|
|
||||||
"
|
|
||||||
>Veranstaltung löschen</a
|
|
||||||
>
|
|
||||||
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting = null">Abbrechen</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ui-popup>
|
|
||||||
|
|
||||||
<ui-popup v-if="single !== null && single.config === null" heading="Vorlage auswählen" @close="cancel">
|
<ui-popup v-if="single !== null && single.config === null" heading="Vorlage auswählen" @close="cancel">
|
||||||
<div class="mt-3 grid gap-3 grid-cols-2">
|
<div class="mt-3 grid gap-3 grid-cols-2">
|
||||||
<a v-for="(template, index) in meta.templates" :key="index" class="py-2 px-3 border rounded bg-zinc-800 hover:bg-zinc-700 transition" href="#" @click.prevent="setTemplate(template)">
|
<a v-for="(template, index) in meta.templates" :key="index" class="py-2 px-3 border rounded bg-zinc-800 hover:bg-zinc-700 transition" href="#" @click.prevent="setTemplate(template)">
|
||||||
<span v-text="template.name"></span>
|
<span v-text="template.name" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
|
||||||
<ui-popup v-if="showing !== null" :heading="`Teilnehmende für ${showing.name}`" full @close="showing = null">
|
<ui-popup v-if="showing !== null" :heading="`Teilnehmende für ${showing.name}`" full @close="showing = null">
|
||||||
<participants :has-nami-field="showing.has_nami_field" :root-url="showing.links.participant_root_index" :url="showing.links.participant_index"> </participants>
|
<participants :has-nami-field="showing.has_nami_field" :root-url="showing.links.participant_root_index" :url="showing.links.participant_index" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
|
||||||
<ui-popup v-if="single !== null && single.config !== null" :heading="`Veranstaltung ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel">
|
<ui-popup v-if="single !== null && single.config !== null" :heading="`Veranstaltung ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel">
|
||||||
<div class="flex flex-col mt-3">
|
<div class="flex flex-col mt-3">
|
||||||
<ui-tabs v-model="active" :entries="tabs"></ui-tabs>
|
<ui-tabs v-model="active" :entries="tabs" />
|
||||||
<div v-show="active === 0" class="grid grid-cols-2 gap-3">
|
<div v-show="active === 0" class="grid grid-cols-4 gap-3">
|
||||||
<div class="flex space-x-3">
|
<div class="flex space-x-3 col-span-2">
|
||||||
<f-text id="name" v-model="single.name" class="grow" label="Name" required></f-text>
|
<f-text id="name" v-model="single.name" class="grow" label="Name" required />
|
||||||
<f-switch id="is_active" v-model="single.is_active" name="is_active" label="Aktiv"></f-switch>
|
<f-switch id="is_active" v-model="single.is_active" name="is_active" label="Aktiv" hint="Inaktive Veranstaltungen werden außerhalb von Adrema wie nicht existierende Veranstaltungen betrachtet. Insbesondere ist eine Anmeldung dann nicht möglich und die Veranstaltung erscheint auch nicht in der Veranstaltungs-Übersicht." />
|
||||||
<f-switch id="is_private" v-model="single.is_private" name="is_private" label="Privat"></f-switch>
|
<f-switch id="is_private" v-model="single.is_private" name="is_private" label="Privat" hint="Ist eine Veranstaltung privat, so wird diese nicht auf der Website angezeigt. Eine Anmeldung ist jedoch trotzdem möglich, wenn man über den Anmelde-Link verfügt." />
|
||||||
</div>
|
</div>
|
||||||
<f-singlefile
|
<f-singlefile id="header_image"
|
||||||
id="header_image"
|
|
||||||
v-model="single.header_image"
|
v-model="single.header_image"
|
||||||
|
class="col-span-2"
|
||||||
label="Bild"
|
label="Bild"
|
||||||
name="header_image"
|
name="header_image"
|
||||||
parent-name="form"
|
parent-name="form"
|
||||||
:parent-id="single.id"
|
:parent-id="single.id"
|
||||||
collection="headerImage"
|
collection="headerImage"
|
||||||
required
|
required
|
||||||
></f-singlefile>
|
/>
|
||||||
<f-text id="from" v-model="single.from" type="date" label="Von" required></f-text>
|
<f-text id="from" v-model="single.from" type="date" label="Von" required />
|
||||||
<f-text id="to" v-model="single.to" type="date" label="Bis" required></f-text>
|
<f-text id="to" v-model="single.to" type="date" label="Bis" required />
|
||||||
<f-text id="registration_from" v-model="single.registration_from" type="datetime-local" label="Registrierung von" required></f-text>
|
<f-text id="zip" v-model="single.zip" label="PLZ" />
|
||||||
<f-text id="registration_until" v-model="single.registration_until" type="datetime-local" label="Registrierung bis" required></f-text>
|
<f-text id="location" v-model="single.location" label="Ort" />
|
||||||
<f-textarea
|
<f-select id="country" v-model="single.country" class="col-span-2" name="country" label="Land" :options="meta.countries" />
|
||||||
id="excerpt"
|
<f-text id="registration_from" v-model="single.registration_from" type="datetime-local" label="Registrierung von" hint="Ist eine Anmeldung laut dieser zwei Datumsangaben möglich, kann man sich anmelden. Andernfalls wird die Veranstaltung (mit Beschreibungstext) auf der Übersichtsseite angezeigt, man kommt allerdings nicht zum Anmeldeformular." required />
|
||||||
|
<f-text id="registration_until" v-model="single.registration_until" type="datetime-local" label="Registrierung bis" required />
|
||||||
|
<f-textarea id="excerpt"
|
||||||
v-model="single.excerpt"
|
v-model="single.excerpt"
|
||||||
hint="Gebe hier eine kurze Beschreibung für die Veranstaltungs-Übersicht ein (Maximal 130 Zeichen)."
|
hint="Gebe hier eine kurze Beschreibung für die Veranstaltungs-Übersicht ein (Maximal 130 Zeichen)."
|
||||||
label="Auszug"
|
label="Auszug"
|
||||||
:rows="5"
|
:rows="5"
|
||||||
|
class="col-span-full"
|
||||||
required
|
required
|
||||||
></f-textarea>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="active === 1">
|
<div v-if="active === 1">
|
||||||
<f-editor id="description" v-model="single.description" name="description" label="Beschreibung" :rows="10" required></f-editor>
|
<f-editor id="description" v-model="single.description" name="description" label="Beschreibung" :rows="10" required />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="active === 2">
|
<div v-if="active === 2">
|
||||||
<ui-note class="mt-2"> Sobald sich der erste Teilnehmer für die Veranstaltung angemeldet hat, kann dieses Formular nicht mehr geändert werden. </ui-note>
|
<ui-note class="mt-2"> Sobald sich der erste Teilnehmer für die Veranstaltung angemeldet hat, kann dieses Formular nicht mehr geändert werden. </ui-note>
|
||||||
<form-builder v-model="single.config" :meta="meta"></form-builder>
|
<form-builder v-model="single.config" :meta="meta" />
|
||||||
</div>
|
</div>
|
||||||
<div v-show="active === 3" class="grid grid-cols-[1fr_300px] gap-3">
|
<div v-show="active === 3" class="grid grid-cols-[1fr_300px] gap-3">
|
||||||
<ui-note class="mt-2 col-span-full">
|
<ui-note class="mt-2 col-span-full">
|
||||||
Hier kannst du die E-Mail anpassen, die nach der Anmeldung an den Teilnehmer verschickt wird.<br />
|
Hier kannst du die E-Mail anpassen, die nach der Anmeldung an den Teilnehmer verschickt wird.<br>
|
||||||
Es gibt dafür einen ersten E-Mail-Teil und einen zweiten E-Mail-Teil. Dazwischen werden die Daten des Teilnehmers aufgelistet.<br />
|
Es gibt dafür einen ersten E-Mail-Teil und einen zweiten E-Mail-Teil. Dazwischen werden die Daten des Teilnehmers aufgelistet.<br>
|
||||||
Die Anrede ("Hallo Max Mustermann") wird automatisch an den Anfang gesetzt.<br />
|
Die Anrede ("Hallo Max Mustermann") wird automatisch an den Anfang gesetzt.<br>
|
||||||
Außerdem kannst du Dateien hochladen, die automatisch mit angehangen werden.
|
Außerdem kannst du Dateien hochladen, die automatisch mit angehangen werden.
|
||||||
</ui-note>
|
</ui-note>
|
||||||
<div>
|
<div>
|
||||||
<ui-tabs v-model="activeMailTab" :entries="mailTabs"></ui-tabs>
|
<ui-tabs v-model="activeMailTab" :entries="mailTabs" />
|
||||||
<f-editor v-if="activeMailTab === 0" id="mail_top" v-model="single.mail_top" name="mail_top" label="E-Mail-Teil 1" :rows="8" conditions required>
|
<f-editor v-if="activeMailTab === 0" id="mail_top" v-model="single.mail_top" name="mail_top" label="E-Mail-Teil 1" :rows="8" conditions required>
|
||||||
<template #conditions="{data, resolve}">
|
<template #conditions="{cData, resolve}">
|
||||||
<conditions-form id="mail_top_conditions" :single="single" :value="data" @save="resolve"> </conditions-form>
|
<conditions-form id="mail_top_conditions" :single="single" :value="cData" @save="resolve" />
|
||||||
</template>
|
</template>
|
||||||
</f-editor>
|
</f-editor>
|
||||||
<f-editor v-if="activeMailTab === 1" id="mail_bottom" v-model="single.mail_bottom" name="mail_bottom" label="E-Mail-Teil 2" :rows="8" conditions required>
|
<f-editor v-if="activeMailTab === 1" id="mail_bottom" v-model="single.mail_bottom" name="mail_bottom" label="E-Mail-Teil 2" :rows="8" conditions required>
|
||||||
<template #conditions="{data, resolve}">
|
<template #conditions="{d, resolve}">
|
||||||
<conditions-form id="mail_bottom_conditions" :single="single" :value="data" @save="resolve"> </conditions-form>
|
<conditions-form id="mail_bottom_conditions" :single="single" :value="d" @save="resolve" />
|
||||||
</template>
|
</template>
|
||||||
</f-editor>
|
</f-editor>
|
||||||
</div>
|
</div>
|
||||||
<f-multiplefiles
|
<f-multiplefiles id="mailattachments"
|
||||||
id="mailattachments"
|
|
||||||
v-model="single.mailattachments"
|
v-model="single.mailattachments"
|
||||||
label="Anhänge"
|
label="Anhänge"
|
||||||
name="mailattachments"
|
name="mailattachments"
|
||||||
|
@ -106,87 +90,106 @@
|
||||||
>
|
>
|
||||||
<template #buttons="{file, buttonClass, iconClass}">
|
<template #buttons="{file, buttonClass, iconClass}">
|
||||||
<a v-tooltip="`Bedingungen`" href="#" :class="[buttonClass, 'bg-blue-200', 'relative']" @click.prevent="fileSettingPopup = file">
|
<a v-tooltip="`Bedingungen`" href="#" :class="[buttonClass, 'bg-blue-200', 'relative']" @click.prevent="fileSettingPopup = file">
|
||||||
<div v-if="file.properties.conditions.ifs.length" class="absolute w-2 h-2 -mt-[0.05rem] -ml-[0.05rem] flex-none bg-red-900 rounded-full top-0 left-0"></div>
|
<div v-if="file.properties.conditions.ifs.length" class="absolute w-2 h-2 -mt-[0.05rem] -ml-[0.05rem] flex-none bg-red-900 rounded-full top-0 left-0" />
|
||||||
<ui-sprite src="setting" :class="[iconClass, 'text-blue-800']"></ui-sprite>
|
<ui-sprite src="setting" :class="[iconClass, 'text-blue-800']" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</f-multiplefiles>
|
</f-multiplefiles>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="active === 4">
|
<div v-if="active === 4">
|
||||||
<div class="grid gap-3">
|
<div class="grid gap-3">
|
||||||
<ui-remote-resource id="export" v-model="single.export.root" label="Haupt-Ordner"></ui-remote-resource>
|
<ui-remote-resource id="export" v-model="single.export.root" label="Haupt-Ordner" />
|
||||||
<f-select id="group_by" v-model="single.export.group_by" :options="allFields" label="Gruppieren nach" name="group_by"></f-select>
|
<f-select id="group_by" v-model="single.export.group_by" :options="allFields" label="Gruppieren nach" name="group_by" />
|
||||||
<f-select id="to_group_field" v-model="single.export.to_group_field" :options="allFields" label="Nach Gruppe schreiben" name="to_group_field"></f-select>
|
<f-select id="to_group_field" v-model="single.export.to_group_field" :options="allFields" label="Nach Gruppe schreiben" name="to_group_field" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="active === 5" class="grid grid-cols-2 gap-3">
|
<div v-show="active === 5" class="grid grid-cols-2 gap-3">
|
||||||
<f-switch id="needs_prevention" v-model="single.needs_prevention" name="needs_prevention" label="Prävention"></f-switch>
|
<f-switch id="needs_prevention" v-model="single.needs_prevention" name="needs_prevention" label="Prävention" />
|
||||||
<f-editor
|
<f-editor id="prevention_text"
|
||||||
id="prevention_text"
|
|
||||||
v-model="single.prevention_text"
|
v-model="single.prevention_text"
|
||||||
hint="Wird an die Präventions-Email angehangen, die Teilnehmende dieser Veranstaltung erhalten"
|
hint="Wird an die Präventions-Email angehangen, die Teilnehmende dieser Veranstaltung erhalten"
|
||||||
:rows="6"
|
:rows="6"
|
||||||
label="Präventions-Hinweis"
|
label="Präventions-Hinweis"
|
||||||
></f-editor>
|
/>
|
||||||
<ui-box heading="Bedingung für Präventions-Unterlagen">
|
<ui-box heading="Bedingung für Präventions-Unterlagen">
|
||||||
<conditions id="prevention_conditions" v-model="single.prevention_conditions" :single="single"> </conditions>
|
<conditions id="prevention_conditions" v-model="single.prevention_conditions" :single="single" />
|
||||||
|
</ui-box>
|
||||||
|
</div>
|
||||||
|
<div v-if="active === 6">
|
||||||
|
<ui-box heading="Bedingung für Leiter*in">
|
||||||
|
<conditions id="leader_conditions" v-model="single.leader_conditions" :single="single" />
|
||||||
</ui-box>
|
</ui-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a href="#" @click.prevent="submit">
|
<a href="#" @click.prevent="submit">
|
||||||
<ui-sprite src="save" class="text-zinc-400 w-6 h-6"></ui-sprite>
|
<ui-sprite src="save" class="text-zinc-400 w-6 h-6" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
|
||||||
<ui-popup v-if="fileSettingPopup !== null" :heading="`Bedingungen für Datei ${fileSettingPopup.name}`" @close="fileSettingPopup = null">
|
<ui-popup v-if="fileSettingPopup !== null" :heading="`Bedingungen für Datei ${fileSettingPopup.name}`" @close="fileSettingPopup = null">
|
||||||
<conditions-form id="filesettings" :single="single" :value="fileSettingPopup.properties.conditions" @save="saveFileConditions"> </conditions-form>
|
<conditions-form id="filesettings" :single="single" :value="fileSettingPopup.properties.conditions" @save="saveFileConditions" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
|
||||||
<page-filter>
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)" />
|
||||||
<f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" name="past" size="sm" @update:model-value="setFilter('past', $event)"></f-switch>
|
<f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" name="past" size="sm" @update:model-value="setFilter('past', $event)" />
|
||||||
<f-switch id="inactive" :model-value="getFilter('inactive')" label="inaktive zeigen" name="inactive" size="sm" @update:model-value="setFilter('inactive', $event)"></f-switch>
|
<f-switch id="inactive" :model-value="getFilter('inactive')" label="inaktive zeigen" name="inactive" size="sm" @update:model-value="setFilter('inactive', $event)" />
|
||||||
</template>
|
</template>
|
||||||
</page-filter>
|
</page-filter>
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Von</th>
|
<th>Von</th>
|
||||||
<th>Bis</th>
|
<th>Bis</th>
|
||||||
|
<th>Tags</th>
|
||||||
<th>Anzahl TN</th>
|
<th>Anzahl TN</th>
|
||||||
<th></th>
|
<th />
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<tr v-for="(form, index) in data" :key="index">
|
<tr v-for="(form, index) in data" :key="index">
|
||||||
<td>
|
<td>
|
||||||
<div v-text="form.name"></div>
|
<div v-text="form.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="form.from_human"></div>
|
<div v-text="form.from_human" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="form.to_human"></div>
|
<div v-text="form.to_human" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="form.participants_count"></div>
|
<div class="bool-row">
|
||||||
|
<ui-bool true-comment="aktiv" false-comment="inaktiv" :value="form.is_active">A</ui-bool>
|
||||||
|
<ui-bool true-comment="private Veranstaltung" false-comment="nicht private Veranstaltung" :value="form.is_private">P</ui-bool>
|
||||||
|
<ui-bool true-comment="Anmeldung möglich (lt. 'Registrierung von / bis')" false-comment="Anmeldeschluss erreicht" :value="form.is_in_dates">D</ui-bool>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div v-text="form.participants_count" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="flex space-x-2">
|
<div class="flex space-x-2">
|
||||||
<ui-action-button tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(form)"></ui-action-button>
|
<ui-action-button tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(form)" />
|
||||||
<ui-action-button tooltip="Teilnehmende anzeigen" class="btn-info" icon="user" @click.prevent="showParticipants(form)"></ui-action-button>
|
<ui-action-button tooltip="Teilnehmende anzeigen" class="btn-info" icon="user" @click.prevent="showParticipants(form)" />
|
||||||
<ui-action-button :href="form.links.frontend" target="_BLANK" tooltip="zur Anmeldeseite" class="btn-info" icon="eye"></ui-action-button>
|
<ui-action-button :href="form.links.frontend" target="_BLANK" tooltip="zur Anmeldeseite" class="btn-info" icon="eye" />
|
||||||
<ui-action-button :href="form.links.export" target="_BLANK" tooltip="als Tabellendokument exportieren" class="btn-info" icon="document"></ui-action-button>
|
<ui-action-button tooltip="Kopieren" class="btn-info" icon="copy" @click="onCopy(form)" />
|
||||||
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = form"></ui-action-button>
|
<ui-action-button tooltip="Nachmelde-Link kopieren" class="btn-info" icon="externallink" @click="copyLaterLink(form)" />
|
||||||
|
<ui-action-button tooltip="Zuschuss-Liste erstellen" class="btn-info" icon="contribution" @click="onGenerateContribution(form)" />
|
||||||
|
<ui-action-button :href="form.links.export" target="_BLANK" tooltip="als Tabellendokument exportieren" class="btn-info" icon="document" />
|
||||||
|
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="onDelete(form)" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage"></ui-pagination>
|
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage" />
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -199,27 +202,32 @@ import Participants from './Participants.vue';
|
||||||
import Conditions from './Conditions.vue';
|
import Conditions from './Conditions.vue';
|
||||||
import ConditionsForm from './ConditionsForm.vue';
|
import ConditionsForm from './ConditionsForm.vue';
|
||||||
import { useToast } from 'vue-toastification';
|
import { useToast } from 'vue-toastification';
|
||||||
|
import useSwal from '@/stores/swalStore.ts';
|
||||||
|
import useDownloads from '@/composables/useDownloads.ts';
|
||||||
|
import useClipboard from 'vue-clipboard3';
|
||||||
|
|
||||||
const props = defineProps(indexProps);
|
const props = defineProps(indexProps);
|
||||||
var { meta, data, reloadPage, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form');
|
const { meta, data, reloadPage, reload, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form');
|
||||||
const axios = inject('axios');
|
const axios = inject('axios');
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
const {download} = useDownloads();
|
||||||
|
const {toClipboard} = useClipboard();
|
||||||
|
|
||||||
const deleting = ref(null);
|
|
||||||
const showing = ref(null);
|
const showing = ref(null);
|
||||||
const fileSettingPopup = ref(null);
|
const fileSettingPopup = ref(null);
|
||||||
|
|
||||||
const active = ref(0);
|
const active = ref(0);
|
||||||
const activeMailTab = ref(0);
|
const activeMailTab = ref(0);
|
||||||
const tabs = [{ title: 'Allgemeines' }, { title: 'Beschreibung' }, { title: 'Formular' }, { title: 'Bestätigungs-E-Mail' }, { title: 'Export' }, { title: 'Prävention' }];
|
const tabs = [{ title: 'Allgemeines' }, { title: 'Beschreibung' }, { title: 'Formular' }, { title: 'Bestätigungs-E-Mail' }, { title: 'Export' }, { title: 'Prävention' }, {title: 'Zuschüsse'}];
|
||||||
const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }];
|
const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }];
|
||||||
|
const swal = useSwal();
|
||||||
|
|
||||||
const allFields = computed(() => {
|
const allFields = computed(() => {
|
||||||
if (!single.value) {
|
if (!single.value) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = [];
|
const result = [];
|
||||||
single.value.config.sections.forEach((section) => {
|
single.value.config.sections.forEach((section) => {
|
||||||
section.fields.forEach((field) => {
|
section.fields.forEach((field) => {
|
||||||
result.push({ id: field.key, name: field.name });
|
result.push({ id: field.key, name: field.name });
|
||||||
|
@ -229,6 +237,31 @@ const allFields = computed(() => {
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
async function onCopy(form) {
|
||||||
|
await swal.confirm('Diese Veranstaltung kopieren?', 'Nach dem Kopieren wird die Veranstaltung auf inaktiv gesetzt. Bitte aktiviere den Filter "inaktive zeigen", um die kopierte Veranstaltung zu sehen.');
|
||||||
|
await axios.post(form.links.copy, {});
|
||||||
|
reload(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onGenerateContribution(form) {
|
||||||
|
const response = await swal.ask('Zuschussliste erstellen', 'Hiermit erstellst du eine Zuschussliste mit allen angemeldeten Mitgliedern. Bite wähle aus, für welche Organisation du eine Liste erstellen willst.', [
|
||||||
|
{
|
||||||
|
name: 'type',
|
||||||
|
label: 'Organisation',
|
||||||
|
required: true,
|
||||||
|
type: 'select',
|
||||||
|
options: meta.value.contribution_types,
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
await download(form.links.contribution, {type: response.type, validate: '1'});
|
||||||
|
await download(form.links.contribution, {type: response.type});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onDelete(form) {
|
||||||
|
await swal.confirm('Diese Veranstaltung löschen?', `Die Veranstaltung ${form.name} wird gelöscht werden.`);
|
||||||
|
await remove(form);
|
||||||
|
}
|
||||||
|
|
||||||
function setTemplate(template) {
|
function setTemplate(template) {
|
||||||
active.value = 0;
|
active.value = 0;
|
||||||
single.value.config = template.config;
|
single.value.config = template.config;
|
||||||
|
@ -236,6 +269,12 @@ function setTemplate(template) {
|
||||||
single.value.mail_bottom = template.mail_bottom;
|
single.value.mail_bottom = template.mail_bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function copyLaterLink(form) {
|
||||||
|
const response = await axios.get(form.links.laterlink);
|
||||||
|
await toClipboard(response.data.url);
|
||||||
|
toast.success('Link in Zwischenablage kopiert');
|
||||||
|
}
|
||||||
|
|
||||||
async function saveFileConditions(conditions) {
|
async function saveFileConditions(conditions) {
|
||||||
await axios.patch(`/mediaupload/${fileSettingPopup.value.id}`, {
|
await axios.patch(`/mediaupload/${fileSettingPopup.value.id}`, {
|
||||||
properties: {
|
properties: {
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ui-popup v-if="editing !== null" heading="Mitglied bearbeiten" closeable full @close="editing = null">
|
<ui-popup v-if="editing !== null" heading="Mitglied bearbeiten" closeable full @close="editing = null">
|
||||||
<event-form
|
<event-form :value="editing.preview"
|
||||||
:value="editing.preview"
|
|
||||||
:base-url="meta.base_url"
|
:base-url="meta.base_url"
|
||||||
style="--primary: hsl(181, 75%, 26%); --secondary: hsl(181, 75%, 35%); --font: hsl(181, 84%, 78%); --circle: hsl(181, 86%, 16%)"
|
style="--primary: hsl(181, 75%, 26%); --secondary: hsl(181, 75%, 35%); --font: hsl(181, 84%, 78%); --circle: hsl(181, 86%, 16%)"
|
||||||
as-form
|
as-form
|
||||||
@save="updateParticipant($event.detail[0])"
|
@save="updateParticipant($event.detail[0])"
|
||||||
></event-form>
|
/>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<ui-popup v-if="assigning !== null" heading="Mitglied zuweisen" closeable @close="assigning = null">
|
<ui-popup v-if="assigning !== null" heading="Mitglied zuweisen" closeable @close="assigning = null">
|
||||||
<member-assign @assign="assign"></member-assign>
|
<member-assign @assign="assign" />
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<ui-popup v-if="deleting !== null" heading="Teilnehmer*in löschen?" @close="deleting = null">
|
<ui-popup v-if="deleting !== null" heading="Teilnehmer*in löschen?" @close="deleting = null">
|
||||||
<div>
|
<div>
|
||||||
|
@ -23,16 +22,15 @@
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<page-filter>
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" v-model="innerFilter.search" name="search" label="Suchen" size="sm"></f-text>
|
<f-text id="search" v-model="innerFilter.search" name="search" label="Suchen" size="sm" />
|
||||||
<ui-icon-button icon="plus" @click="editing = {participant: null, preview: JSON.stringify(meta.form_config)}">Hinzufügen</ui-icon-button>
|
<ui-icon-button icon="plus" @click="editing = {participant: null, preview: JSON.stringify(meta.form_config)}">Hinzufügen</ui-icon-button>
|
||||||
<f-switch v-if="meta.has_nami_field" id="group_participants" v-model="groupParticipants" label="Gruppieren" size="sm" name="group_participants"></f-switch>
|
<f-switch v-if="meta.has_nami_field" id="group_participants" v-model="groupParticipants" label="Gruppieren" size="sm" name="group_participants" />
|
||||||
<f-multipleselect id="active_columns" v-model="activeColumnsConfig" :options="meta.columns" label="Aktive Spalten" size="sm"></f-multipleselect>
|
<f-multipleselect id="active_columns" v-model="activeColumnsConfig" :options="meta.columns" label="Aktive Spalten" size="sm" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #fields>
|
<template #fields>
|
||||||
<template v-for="(filter, index) in meta.filters">
|
<template v-for="(filter, index) in meta.filters">
|
||||||
<f-select
|
<f-select v-if="filter.base_type === 'CheckboxField'"
|
||||||
v-if="filter.base_type === 'CheckboxField'"
|
|
||||||
:id="`filter-field-${index}`"
|
:id="`filter-field-${index}`"
|
||||||
:key="`filter-field-${index}`"
|
:key="`filter-field-${index}`"
|
||||||
v-model="innerFilter.data[filter.key]"
|
v-model="innerFilter.data[filter.key]"
|
||||||
|
@ -41,9 +39,8 @@
|
||||||
:options="checkboxFilterOptions"
|
:options="checkboxFilterOptions"
|
||||||
:label="filter.name"
|
:label="filter.name"
|
||||||
size="sm"
|
size="sm"
|
||||||
></f-select>
|
/>
|
||||||
<f-select
|
<f-select v-if="filter.base_type === 'DropdownField'"
|
||||||
v-if="filter.base_type === 'DropdownField'"
|
|
||||||
:id="`filter-field-${index}`"
|
:id="`filter-field-${index}`"
|
||||||
:key="`filter-field-${index}`"
|
:key="`filter-field-${index}`"
|
||||||
v-model="innerFilter.data[filter.key]"
|
v-model="innerFilter.data[filter.key]"
|
||||||
|
@ -52,9 +49,8 @@
|
||||||
:options="dropdownFilterOptions(filter)"
|
:options="dropdownFilterOptions(filter)"
|
||||||
:label="filter.name"
|
:label="filter.name"
|
||||||
size="sm"
|
size="sm"
|
||||||
></f-select>
|
/>
|
||||||
<f-select
|
<f-select v-if="filter.base_type === 'RadioField'"
|
||||||
v-if="filter.base_type === 'RadioField'"
|
|
||||||
:id="`filter-field-${index}`"
|
:id="`filter-field-${index}`"
|
||||||
:key="`filter-field-${index}`"
|
:key="`filter-field-${index}`"
|
||||||
v-model="innerFilter.data[filter.key]"
|
v-model="innerFilter.data[filter.key]"
|
||||||
|
@ -63,22 +59,21 @@
|
||||||
:options="dropdownFilterOptions(filter)"
|
:options="dropdownFilterOptions(filter)"
|
||||||
:label="filter.name"
|
:label="filter.name"
|
||||||
size="sm"
|
size="sm"
|
||||||
></f-select>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</page-filter>
|
</page-filter>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<ui-th
|
<ui-th v-for="column in activeColumns"
|
||||||
v-for="column in activeColumns"
|
|
||||||
:key="column.id"
|
:key="column.id"
|
||||||
:column="column.id"
|
:column="column.id"
|
||||||
:label="column.name"
|
:label="column.name"
|
||||||
:value="getSort"
|
:value="getSort"
|
||||||
sortable
|
sortable
|
||||||
@update:model-value="setSort(column.id, {filter: toFilterString(innerFilter)})"
|
@update:model-value="setSort(column.id, {filter: toFilterString(innerFilter)})"
|
||||||
></ui-th>
|
/>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<template v-for="(participant, index) in data" :key="index">
|
<template v-for="(participant, index) in data" :key="index">
|
||||||
|
@ -86,21 +81,21 @@
|
||||||
<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">
|
<div class="flex items-center space-x-2">
|
||||||
<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" />
|
||||||
</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 v-if="columnindex === 0 && groupParticipants" :value="participant" :level="0" :active="isOpen(participant.id)" @toggle="toggle(participant)">
|
||||||
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items"></prevention>
|
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items" />
|
||||||
<span v-else v-text="participant[column.display_attribute]"></span>
|
<span v-else v-text="participant[column.display_attribute]" />
|
||||||
</ui-table-toggle-button>
|
</ui-table-toggle-button>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items"></prevention>
|
<prevention v-if="column.display_attribute === 'prevention_display'" :value="participant.prevention_items" />
|
||||||
<span v-else v-text="participant[column.display_attribute]"></span>
|
<span v-else v-text="participant[column.display_attribute]" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a v-tooltip="`Bearbeiten`" href="#" class="ml-2 inline-flex btn btn-warning btn-sm" @click.prevent="editReal(participant)"><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(participant)"><ui-sprite src="pencil" /></a>
|
||||||
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = participant"><ui-sprite src="trash"></ui-sprite></a>
|
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = participant"><ui-sprite src="trash" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<template v-for="child in childrenOf(participant.id)" :key="child.id">
|
<template v-for="child in childrenOf(participant.id)" :key="child.id">
|
||||||
|
@ -108,25 +103,25 @@
|
||||||
<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">
|
<div class="flex items-center space-x-2">
|
||||||
<ui-table-toggle-button v-if="columnindex === 0 && groupParticipants" :value="child" :level="1" :active="isOpen(child.id)" @toggle="toggle(child)">
|
<ui-table-toggle-button v-if="columnindex === 0 && groupParticipants" :value="child" :level="1" :active="isOpen(child.id)" @toggle="toggle(child)">
|
||||||
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items"></prevention>
|
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items" />
|
||||||
<span v-else v-text="child[column.display_attribute]"></span>
|
<span v-else v-text="child[column.display_attribute]" />
|
||||||
</ui-table-toggle-button>
|
</ui-table-toggle-button>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items"></prevention>
|
<prevention v-if="column.display_attribute === 'prevention_display'" :value="child.prevention_items" />
|
||||||
<span v-else v-text="child[column.display_attribute]"></span>
|
<span v-else v-text="child[column.display_attribute]" />
|
||||||
</div>
|
</div>
|
||||||
</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" /></a>
|
||||||
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = child"><ui-sprite src="trash"></ui-sprite></a>
|
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = child"><ui-sprite src="trash" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</table>
|
</table>
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage($event, {filter: toFilterString(innerFilter)})"></ui-pagination>
|
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage($event, {filter: toFilterString(innerFilter)})" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,15 +9,13 @@
|
||||||
<div>
|
<div>
|
||||||
<p class="mt-4">Diese Formular-Vorlage löschen?</p>
|
<p class="mt-4">Diese Formular-Vorlage löschen?</p>
|
||||||
<div class="grid grid-cols-2 gap-3 mt-6">
|
<div class="grid grid-cols-2 gap-3 mt-6">
|
||||||
<a
|
<a href="#"
|
||||||
href="#"
|
|
||||||
class="text-center btn btn-danger"
|
class="text-center btn btn-danger"
|
||||||
@click.prevent="
|
@click.prevent="
|
||||||
remove(deleting);
|
remove(deleting);
|
||||||
deleting = null;
|
deleting = null;
|
||||||
"
|
"
|
||||||
>Formular-Vorlage löschen</a
|
>Formular-Vorlage löschen</a>
|
||||||
>
|
|
||||||
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting = null">Abbrechen</a>
|
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting = null">Abbrechen</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,35 +23,35 @@
|
||||||
|
|
||||||
<ui-popup v-if="single !== null" :heading="`Vorlage ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel">
|
<ui-popup v-if="single !== null" :heading="`Vorlage ${single.id ? 'bearbeiten' : 'erstellen'}`" full @close="cancel">
|
||||||
<div class="flex flex-col mt-3">
|
<div class="flex flex-col mt-3">
|
||||||
<ui-tabs v-model="activeTab" :entries="tabs"></ui-tabs>
|
<ui-tabs v-model="activeTab" :entries="tabs" />
|
||||||
<form-builder v-if="activeTab === 0" v-model="single.config" :meta="meta">
|
<form-builder v-if="activeTab === 0" v-model="single.config" :meta="meta">
|
||||||
<template #meta>
|
<template #meta>
|
||||||
<f-text id="name" v-model="single.name" label="Name" required></f-text>
|
<f-text id="name" v-model="single.name" label="Name" required />
|
||||||
</template>
|
</template>
|
||||||
</form-builder>
|
</form-builder>
|
||||||
<div v-show="activeTab === 1" class="grid gap-3">
|
<div v-show="activeTab === 1" class="grid gap-3">
|
||||||
<ui-note class="mt-2 col-span-full">
|
<ui-note class="mt-2 col-span-full">
|
||||||
Hier kannst du die E-Mail anpassen, die nach der Anmeldung an den Teilnehmer verschickt wird.<br />
|
Hier kannst du die E-Mail anpassen, die nach der Anmeldung an den Teilnehmer verschickt wird.<br>
|
||||||
Es gibt dafür einen ersten E-Mail-Teil und einen zweiten E-Mail-Teil. Dazwischen werden die Daten des Teilnehmers aufgelistet.<br />
|
Es gibt dafür einen ersten E-Mail-Teil und einen zweiten E-Mail-Teil. Dazwischen werden die Daten des Teilnehmers aufgelistet.<br>
|
||||||
Die Anrede ("Hallo Max Mustermann") wird automatisch an den Anfang gesetzt.<br />
|
Die Anrede ("Hallo Max Mustermann") wird automatisch an den Anfang gesetzt.<br>
|
||||||
Außerdem kannst du Dateien hochladen, die automatisch mit angehangen werden.
|
Außerdem kannst du Dateien hochladen, die automatisch mit angehangen werden.
|
||||||
</ui-note>
|
</ui-note>
|
||||||
<ui-tabs v-model="activeMailTab" :entries="mailTabs"></ui-tabs>
|
<ui-tabs v-model="activeMailTab" :entries="mailTabs" />
|
||||||
<f-editor v-if="activeMailTab === 0" id="mail_top" v-model="single.mail_top" name="mail_top" label="E-Mail-Teil 1" :rows="8" conditions required>
|
<f-editor v-if="activeMailTab === 0" id="mail_top" v-model="single.mail_top" name="mail_top" label="E-Mail-Teil 1" :rows="8" conditions required>
|
||||||
<template #conditions="{data, resolve}">
|
<template #conditions="{data, resolve}">
|
||||||
<conditions-form id="mail_top_conditions" :single="single" :value="data" @save="resolve"> </conditions-form>
|
<conditions-form id="mail_top_conditions" :single="single" :value="data" @save="resolve" />
|
||||||
</template>
|
</template>
|
||||||
</f-editor>
|
</f-editor>
|
||||||
<f-editor v-if="activeMailTab === 1" id="mail_bottom" v-model="single.mail_bottom" name="mail_bottom" label="E-Mail-Teil 2" :rows="8" conditions required>
|
<f-editor v-if="activeMailTab === 1" id="mail_bottom" v-model="single.mail_bottom" name="mail_bottom" label="E-Mail-Teil 2" :rows="8" conditions required>
|
||||||
<template #conditions="{data, resolve}">
|
<template #conditions="{data, resolve}">
|
||||||
<conditions-form id="mail_bottom_conditions" :single="single" :value="data" @save="resolve"> </conditions-form>
|
<conditions-form id="mail_bottom_conditions" :single="single" :value="data" @save="resolve" />
|
||||||
</template>
|
</template>
|
||||||
</f-editor>
|
</f-editor>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a href="#" @click.prevent="submit">
|
<a href="#" @click.prevent="submit">
|
||||||
<ui-sprite src="save" class="text-zinc-400 w-6 h-6"></ui-sprite>
|
<ui-sprite src="save" class="text-zinc-400 w-6 h-6" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
@ -61,21 +59,21 @@
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr v-for="(formtemplate, index) in data" :key="index">
|
<tr v-for="(formtemplate, index) in data" :key="index">
|
||||||
<td>
|
<td>
|
||||||
<div v-text="formtemplate.name"></div>
|
<div v-text="formtemplate.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a v-tooltip="`Bearbeiten`" href="#" class="ml-2 inline-flex btn btn-warning btn-sm" @click.prevent="edit(formtemplate)"><ui-sprite src="pencil"></ui-sprite></a>
|
<a v-tooltip="`Bearbeiten`" href="#" class="ml-2 inline-flex btn btn-warning btn-sm" @click.prevent="edit(formtemplate)"><ui-sprite src="pencil" /></a>
|
||||||
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = formtemplate"><ui-sprite src="trash"></ui-sprite></a>
|
<a v-tooltip="`Löschen`" href="#" class="ml-2 inline-flex btn btn-danger btn-sm" @click.prevent="deleting = formtemplate"><ui-sprite src="trash" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage"></ui-pagination>
|
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage" />
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -93,7 +91,7 @@ const tabs = [{ title: 'Formular' }, { title: 'Bestätigungs-E-Mail' }];
|
||||||
const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }];
|
const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }];
|
||||||
|
|
||||||
const props = defineProps(indexProps);
|
const props = defineProps(indexProps);
|
||||||
var { meta, data, reloadPage, create, remove, single, edit, cancel, submit } = useIndex(props.data, 'invoice');
|
const { meta, data, reloadPage, create, remove, single, edit, cancel, submit } = useIndex(props.data, 'invoice');
|
||||||
|
|
||||||
function innerSubmit(payload) {
|
function innerSubmit(payload) {
|
||||||
single.value = payload;
|
single.value = payload;
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<page-layout>
|
||||||
<template #right>
|
<template #right>
|
||||||
<f-save-button form="groupform"></f-save-button>
|
<f-save-button form="groupform" />
|
||||||
</template>
|
</template>
|
||||||
<ui-popup v-if="editing !== null" heading="Untergruppen bearbeiten" inner-width="max-w-5xl" @close="editing = null">
|
<ui-popup v-if="editing !== null" heading="Untergruppen bearbeiten" inner-width="max-w-5xl" @close="editing = null">
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a href="#" @click.prevent="store">
|
<a href="#" @click.prevent="store">
|
||||||
<ui-sprite src="save" class="text-zinc-400 w-6 h-6"></ui-sprite>
|
<ui-sprite src="save" class="text-zinc-400 w-6 h-6" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<div class="flex space-x-3">
|
<div class="flex space-x-3">
|
||||||
<f-text id="parent-inner_name" v-model="editing.parent.inner_name" label="Interner Name"></f-text>
|
<f-text id="parent-inner_name" v-model="editing.parent.inner_name" label="Interner Name" />
|
||||||
<f-select id="parent-level" v-model="editing.parent.level" label="Ebene" name="parent-level" :options="meta.levels"></f-select>
|
<f-select id="parent-level" v-model="editing.parent.level" label="Ebene" name="parent-level" :options="meta.levels" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm table">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm table">
|
||||||
|
@ -23,16 +23,16 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="child in editing.children" :key="child.id">
|
<tr v-for="child in editing.children" :key="child.id">
|
||||||
<td>
|
<td>
|
||||||
<span v-text="child.name"></span>
|
<span v-text="child.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<f-text :id="`inner_name-${child.id}`" v-model="child.inner_name" label="" size="sm"></f-text>
|
<f-text :id="`inner_name-${child.id}`" v-model="child.inner_name" label="" size="sm" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<f-select :id="`level-${child.id}`" v-model="child.level" label="" size="sm" :name="`level-${child.id}`" :options="meta.levels"></f-select>
|
<f-select :id="`level-${child.id}`" v-model="child.level" label="" size="sm" :name="`level-${child.id}`" :options="meta.levels" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ui-remote-resource :id="`fileshare-${child.id}`" v-model="child.fileshare" size="sm" label=""></ui-remote-resource>
|
<ui-remote-resource :id="`fileshare-${child.id}`" v-model="child.fileshare" size="sm" label="" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -44,44 +44,40 @@
|
||||||
<th>NaMi-Name</th>
|
<th>NaMi-Name</th>
|
||||||
<th>Interner Name</th>
|
<th>Interner Name</th>
|
||||||
<th>Ebene</th>
|
<th>Ebene</th>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<template v-for="child in childrenOf('null')" :key="child.id">
|
<template v-for="child in childrenOf('null')" :key="child.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ui-table-toggle-button :value="child" :text="child.name" :level="0" :active="isOpen(child.id)" @toggle="toggle(child)"></ui-table-toggle-button>
|
<ui-table-toggle-button :value="child" :text="child.name" :level="0" :active="isOpen(child.id)" @toggle="toggle(child)" />
|
||||||
</td>
|
</td>
|
||||||
<td v-text="child.inner_name"></td>
|
<td v-text="child.inner_name" />
|
||||||
<td v-text="child.level"></td>
|
<td v-text="child.level" />
|
||||||
<td>
|
<td>
|
||||||
<a v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(child)"><ui-sprite src="pencil"></ui-sprite></a>
|
<a v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(child)"><ui-sprite src="pencil" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<template v-for="subchild in childrenOf(child.id)" :key="subchild.id">
|
<template v-for="subchild in childrenOf(child.id)" :key="subchild.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ui-table-toggle-button :value="subchild" :text="subchild.name" :level="1" :active="isOpen(subchild.id)" @toggle="toggle(subchild)"></ui-table-toggle-button>
|
<ui-table-toggle-button :value="subchild" :text="subchild.name" :level="1" :active="isOpen(subchild.id)" @toggle="toggle(subchild)" />
|
||||||
</td>
|
</td>
|
||||||
<td v-text="subchild.inner_name"></td>
|
<td v-text="subchild.inner_name" />
|
||||||
<td v-text="subchild.level"></td>
|
<td v-text="subchild.level" />
|
||||||
<td>
|
<td>
|
||||||
<a v-if="subchild.children_count" v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(subchild)"
|
<a v-if="subchild.children_count" v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(subchild)"><ui-sprite src="pencil" /></a>
|
||||||
><ui-sprite src="pencil"></ui-sprite
|
|
||||||
></a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<template v-for="subsubchild in childrenOf(subchild.id)" :key="subchild.id">
|
<template v-for="subsubchild in childrenOf(subchild.id)" :key="subchild.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ui-table-toggle-button :value="subsubchild" :text="subsubchild.name" :level="2" :active="isOpen(subsubchild.id)"></ui-table-toggle-button>
|
<ui-table-toggle-button :value="subsubchild" :text="subsubchild.name" :level="2" :active="isOpen(subsubchild.id)" />
|
||||||
</td>
|
</td>
|
||||||
<td v-text="subsubchild.inner_name"></td>
|
<td v-text="subsubchild.inner_name" />
|
||||||
<td v-text="subsubchild.level"></td>
|
<td v-text="subsubchild.level" />
|
||||||
<td>
|
<td>
|
||||||
<a v-if="subsubchild.children_count" v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(subsubchild)"
|
<a v-if="subsubchild.children_count" v-tooltip="`Bearbeiten`" href="#" class="inline-flex btn btn-warning btn-sm" @click.prevent="edit(subsubchild)"><ui-sprite src="pencil" /></a>
|
||||||
><ui-sprite src="pencil"></ui-sprite
|
|
||||||
></a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
|
@ -98,10 +94,10 @@ import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
|
||||||
import useTableToggle from '../../composables/useTableToggle.js';
|
import useTableToggle from '../../composables/useTableToggle.js';
|
||||||
|
|
||||||
const props = defineProps(indexProps);
|
const props = defineProps(indexProps);
|
||||||
var { axios, meta, data } = useIndex(props.data, 'invoice');
|
const { axios, meta, data } = useIndex(props.data, 'invoice');
|
||||||
const { isOpen, toggle, childrenOf } = useTableToggle({ null: data.value });
|
const { isOpen, toggle, childrenOf } = useTableToggle({ null: data.value });
|
||||||
|
|
||||||
var editing = ref(null);
|
const editing = ref(null);
|
||||||
|
|
||||||
async function edit(parent) {
|
async function edit(parent) {
|
||||||
editing.value = {
|
editing.value = {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<ui-popup v-if="massstore !== null" heading="Massenrechnung anlegen" @close="massstore = null">
|
<ui-popup v-if="massstore !== null" heading="Massenrechnung anlegen" @close="massstore = null">
|
||||||
<form @submit.prevent="sendMassstore">
|
<form @submit.prevent="sendMassstore">
|
||||||
<section class="grid grid-cols-2 gap-3 mt-6">
|
<section class="grid grid-cols-2 gap-3 mt-6">
|
||||||
<f-text id="year" v-model="massstore.year" label="Jahr" required></f-text>
|
<f-text id="year" v-model="massstore.year" label="Jahr" required />
|
||||||
</section>
|
</section>
|
||||||
<section class="flex mt-4 space-x-2">
|
<section class="flex mt-4 space-x-2">
|
||||||
<ui-button type="submit" class="btn-danger">Speichern</ui-button>
|
<ui-button type="submit" class="btn-danger">Speichern</ui-button>
|
||||||
|
@ -21,15 +21,13 @@
|
||||||
<div>
|
<div>
|
||||||
<p class="mt-4">Diese Rechnung löschen?</p>
|
<p class="mt-4">Diese Rechnung löschen?</p>
|
||||||
<div class="grid grid-cols-2 gap-3 mt-6">
|
<div class="grid grid-cols-2 gap-3 mt-6">
|
||||||
<a
|
<a href="#"
|
||||||
href="#"
|
|
||||||
class="text-center btn btn-danger"
|
class="text-center btn btn-danger"
|
||||||
@click.prevent="
|
@click.prevent="
|
||||||
remove(deleting);
|
remove(deleting);
|
||||||
deleting = null;
|
deleting = null;
|
||||||
"
|
"
|
||||||
>Rechnung löschen</a
|
>Rechnung löschen</a>
|
||||||
>
|
|
||||||
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting = null">Abbrechen</a>
|
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting = null">Abbrechen</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,33 +35,33 @@
|
||||||
<ui-popup v-if="single !== null" :heading="`Rechnung ${single.id ? 'bearbeiten' : 'erstellen'}`" inner-width="max-w-4xl" @close="cancel">
|
<ui-popup v-if="single !== null" :heading="`Rechnung ${single.id ? 'bearbeiten' : 'erstellen'}`" inner-width="max-w-4xl" @close="cancel">
|
||||||
<form class="grid grid-cols-2 gap-3 mt-4" @submit.prevent="submit">
|
<form class="grid grid-cols-2 gap-3 mt-4" @submit.prevent="submit">
|
||||||
<ui-box heading="Für Mitglied anlegen" container-class="flex space-x-3" class="col-span-full">
|
<ui-box heading="Für Mitglied anlegen" container-class="flex space-x-3" class="col-span-full">
|
||||||
<f-select id="forMemberMember" v-model="forMember.member_id" name="forMemberMember" :options="meta.members" label="Mitglied"></f-select>
|
<f-select id="forMemberMember" v-model="forMember.member_id" name="forMemberMember" :options="meta.members" label="Mitglied" />
|
||||||
<f-select id="forMemberSubscription" v-model="forMember.subscription_id" name="forMemberSubscription" :options="meta.subscriptions" label="Beitrag"></f-select>
|
<f-select id="forMemberSubscription" v-model="forMember.subscription_id" name="forMemberSubscription" :options="meta.subscriptions" label="Beitrag" />
|
||||||
<f-text id="forMemberYear" v-model="forMember.year" label="Jahr"></f-text>
|
<f-text id="forMemberYear" v-model="forMember.year" label="Jahr" />
|
||||||
<ui-icon-button class="btn-primary self-end mb-2" icon="save" @click="saveForMember">Speichern</ui-icon-button>
|
<ui-icon-button class="btn-primary self-end mb-2" icon="save" @click="saveForMember">Speichern</ui-icon-button>
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<ui-box heading=" Empfänger" container-class="grid grid-cols-2 gap-3 col-span-full">
|
<ui-box heading=" Empfänger" container-class="grid grid-cols-2 gap-3 col-span-full">
|
||||||
<f-text id="to_name" v-model="single.to.name" label="Name" class="col-span-full" required></f-text>
|
<f-text id="to_name" v-model="single.to.name" label="Name" class="col-span-full" required />
|
||||||
<f-text id="to_address" v-model="single.to.address" label="Adresse" class="col-span-full" required></f-text>
|
<f-text id="to_address" v-model="single.to.address" label="Adresse" class="col-span-full" required />
|
||||||
<f-text id="to_zip" v-model="single.to.zip" label="PLZ" required></f-text>
|
<f-text id="to_zip" v-model="single.to.zip" label="PLZ" required />
|
||||||
<f-text id="to_location" v-model="single.to.location" label="Ort" required></f-text>
|
<f-text id="to_location" v-model="single.to.location" label="Ort" required />
|
||||||
<f-text id="mail_email" v-model="single.mail_email" label="E-Mail-Adresse" class="col-span-full"></f-text>
|
<f-text id="mail_email" v-model="single.mail_email" label="E-Mail-Adresse" class="col-span-full" />
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<ui-box heading="Status" container-class="grid gap-3">
|
<ui-box heading="Status" container-class="grid gap-3">
|
||||||
<f-select id="status" v-model="single.status" :options="meta.statuses" name="status" label="Status" required></f-select>
|
<f-select id="status" v-model="single.status" :options="meta.statuses" name="status" label="Status" required />
|
||||||
<f-select id="via" v-model="single.via" :options="meta.vias" name="via" label="Rechnungsweg" required></f-select>
|
<f-select id="via" v-model="single.via" :options="meta.vias" name="via" label="Rechnungsweg" required />
|
||||||
<f-text id="greeting" v-model="single.greeting" label="Anrede" required></f-text>
|
<f-text id="greeting" v-model="single.greeting" label="Anrede" required />
|
||||||
<f-text id="usage" v-model="single.usage" label="Verwendungszweck" required></f-text>
|
<f-text id="usage" v-model="single.usage" label="Verwendungszweck" required />
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<ui-box heading="Positionen" class="col-span-full" container-class="grid gap-3">
|
<ui-box heading="Positionen" class="col-span-full" container-class="grid gap-3">
|
||||||
<template #in-title>
|
<template #in-title>
|
||||||
<ui-icon-button class="ml-3 btn-primary" icon="plus" @click="single.positions.push({...meta.default_position})">Neu</ui-icon-button>
|
<ui-icon-button class="ml-3 btn-primary" icon="plus" @click="single.positions.push({...meta.default_position})">Neu</ui-icon-button>
|
||||||
</template>
|
</template>
|
||||||
<div v-for="(position, index) in single.positions" :key="index" class="flex items-end space-x-3">
|
<div v-for="(position, index) in single.positions" :key="index" class="flex items-end space-x-3">
|
||||||
<f-text :id="`position-description-${index}`" v-model="position.description" class="grow" label="Beschreibung" required></f-text>
|
<f-text :id="`position-description-${index}`" v-model="position.description" class="grow" label="Beschreibung" required />
|
||||||
<f-text :id="`position-price-${index}`" v-model="position.price" mode="area" label="Preis" required></f-text>
|
<f-text :id="`position-price-${index}`" v-model="position.price" mode="area" label="Preis" required />
|
||||||
<f-select :id="`position-member-${index}`" v-model="position.member_id" :options="meta.members" :name="`position-member-${index}`" label="Mitglied" required></f-select>
|
<f-select :id="`position-member-${index}`" v-model="position.member_id" :options="meta.members" :name="`position-member-${index}`" label="Mitglied" required />
|
||||||
<button type="button" class="btn btn-danger btn-sm h-[35px]" icon="trash" @click="single.positions.splice(index, 1)"><ui-sprite src="trash"></ui-sprite></button>
|
<button type="button" class="btn btn-danger btn-sm h-[35px]" icon="trash" @click="single.positions.splice(index, 1)"><ui-sprite src="trash" /></button>
|
||||||
</div>
|
</div>
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<section class="flex mt-4 space-x-2">
|
<section class="flex mt-4 space-x-2">
|
||||||
|
@ -74,15 +72,14 @@
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<page-filter>
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)" />
|
||||||
<f-multipleselect
|
<f-multipleselect id="statuses"
|
||||||
id="statuses"
|
|
||||||
:options="meta.statuses"
|
:options="meta.statuses"
|
||||||
:model-value="getFilter('statuses')"
|
:model-value="getFilter('statuses')"
|
||||||
label="Status"
|
label="Status"
|
||||||
size="sm"
|
size="sm"
|
||||||
@update:model-value="setFilter('statuses', $event)"
|
@update:model-value="setFilter('statuses', $event)"
|
||||||
></f-multipleselect>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</page-filter>
|
</page-filter>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
||||||
|
@ -92,38 +89,38 @@
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Gesendet am</th>
|
<th>Gesendet am</th>
|
||||||
<th>Rechnungsweg</th>
|
<th>Rechnungsweg</th>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr v-for="(invoice, index) in data" :key="index">
|
<tr v-for="(invoice, index) in data" :key="index">
|
||||||
<td>
|
<td>
|
||||||
<div v-text="invoice.to.name"></div>
|
<div v-text="invoice.to.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="invoice.sum_human"></div>
|
<div v-text="invoice.sum_human" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="invoice.status"></div>
|
<div v-text="invoice.status" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="invoice.sent_at_human"></div>
|
<div v-text="invoice.sent_at_human" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="invoice.via"></div>
|
<div v-text="invoice.via" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="flex space-x-2">
|
<div class="flex space-x-2">
|
||||||
<ui-action-button tooltip="Anschauen" :href="invoice.links.pdf" class="btn-info" icon="eye" blank></ui-action-button>
|
<ui-action-button tooltip="Anschauen" :href="invoice.links.pdf" class="btn-info" icon="eye" blank />
|
||||||
<ui-action-button tooltip="Erinnerung anschauen" :href="invoice.links.rememberpdf" class="btn-info" icon="document" blank></ui-action-button>
|
<ui-action-button tooltip="Erinnerung anschauen" :href="invoice.links.rememberpdf" class="btn-info" icon="document" blank />
|
||||||
<ui-action-button tooltip="Als Bezahlt markieren" class="btn-warning" icon="money" blank @click.prevent="markAsPaid(invoice)"></ui-action-button>
|
<ui-action-button tooltip="Als Bezahlt markieren" class="btn-warning" icon="money" blank @click.prevent="markAsPaid(invoice)" />
|
||||||
<ui-action-button :data-cy="`edit-button-${invoice.id}`" tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(invoice)"></ui-action-button>
|
<ui-action-button :data-cy="`edit-button-${invoice.id}`" tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(invoice)" />
|
||||||
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = invoice"></ui-action-button>
|
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = invoice" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage"></ui-pagination>
|
<ui-pagination class="mt-4" :value="meta" @reload="reloadPage" />
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -132,7 +129,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
|
import { indexProps, useIndex } from '../../composables/useInertiaApiIndex.js';
|
||||||
const props = defineProps(indexProps);
|
const props = defineProps(indexProps);
|
||||||
var { axios, meta, data, reloadPage, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'invoice');
|
const { axios, meta, data, reloadPage, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'invoice');
|
||||||
const massstore = ref(null);
|
const massstore = ref(null);
|
||||||
const deleting = ref(null);
|
const deleting = ref(null);
|
||||||
const forMember = ref({ member_id: null, subscription_id: null, year: null });
|
const forMember = ref({ member_id: null, subscription_id: null, year: null });
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<page-toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Verteiler erstellen</page-toolbar-button>
|
<page-toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Verteiler erstellen</page-toolbar-button>
|
||||||
</template>
|
</template>
|
||||||
<ui-popup heading="Verteiler löschen?" v-if="deleting !== null" @close="deleting.reject()">
|
<ui-popup v-if="deleting !== null" heading="Verteiler löschen?" @close="deleting.reject()">
|
||||||
<div>
|
<div>
|
||||||
<p class="mt-4">Den Verteiler "{{ deleting.dispatcher.name }}" löschen?</p>
|
<p class="mt-4">Den Verteiler "{{ deleting.dispatcher.name }}" löschen?</p>
|
||||||
<div class="grid grid-cols-2 gap-3 mt-6">
|
<div class="grid grid-cols-2 gap-3 mt-6">
|
||||||
<a href="#" @click.prevent="deleting.resolve()" class="text-center btn btn-danger">Löschen</a>
|
<a href="#" class="text-center btn btn-danger" @click.prevent="deleting.resolve()">Löschen</a>
|
||||||
<a href="#" @click.prevent="deleting.reject()" class="text-center btn btn-primary">Abbrechen</a>
|
<a href="#" class="text-center btn btn-primary" @click.prevent="deleting.reject()">Abbrechen</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
@ -17,22 +17,22 @@
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Domain</th>
|
<th>Domain</th>
|
||||||
<th>Verbindung</th>
|
<th>Verbindung</th>
|
||||||
<th></th>
|
<th />
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr v-for="(dispatcher, index) in data.data" :key="index">
|
<tr v-for="(dispatcher, index) in data.data" :key="index">
|
||||||
<td>
|
<td>
|
||||||
<div v-text="dispatcher.name"></div>
|
<div v-text="dispatcher.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="dispatcher.gateway.domain"></div>
|
<div v-text="dispatcher.gateway.domain" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-text="dispatcher.gateway.name"></div>
|
<div v-text="dispatcher.gateway.name" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<i-link :href="dispatcher.links.edit" class="mr-1 inline-flex btn btn-warning btn-sm"><ui-sprite src="pencil"></ui-sprite></i-link>
|
<i-link :href="dispatcher.links.edit" class="mr-1 inline-flex btn btn-warning btn-sm"><ui-sprite src="pencil" /></i-link>
|
||||||
<button @click.prevent="remove(dispatcher)" class="inline-flex btn btn-danger btn-sm"><ui-sprite src="trash"></ui-sprite></button>
|
<button class="inline-flex btn btn-danger btn-sm" @click.prevent="remove(dispatcher)"><ui-sprite src="trash" /></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -41,6 +41,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
deleting: null,
|
deleting: null,
|
||||||
|
@ -60,8 +63,5 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
data: {},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -4,175 +4,71 @@
|
||||||
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
|
<page-toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</page-toolbar-button>
|
||||||
<page-toolbar-button :href="data.links.edit" color="warning" icon="pencil">bearbeiten</page-toolbar-button>
|
<page-toolbar-button :href="data.links.edit" color="warning" icon="pencil">bearbeiten</page-toolbar-button>
|
||||||
</template>
|
</template>
|
||||||
<div class="p-3 grid gap-3 this-grid grow">
|
<div class="p-3 grid gap-3 xl:grid-rows-[max-content_1fr] xl:grid-cols-[max-content_max-content_max-content_1fr] grow">
|
||||||
<ui-box heading="Stammdaten" class="area-stamm hidden xl:block">
|
<section class="mobile hidden xl:contents">
|
||||||
<stamm :inner="inner"></stamm>
|
<ui-box heading="Stammdaten">
|
||||||
|
<stamm :inner="props.data" />
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<ui-box heading="Kontakt" class="area-kontakt hidden xl:block">
|
<ui-box heading="Kontakt">
|
||||||
<kontakt :inner="inner"></kontakt>
|
<kontakt :inner="props.data" />
|
||||||
</ui-box>
|
</ui-box>
|
||||||
<ui-box class="area-stammkontakt block xl:hidden">
|
<ui-box heading="Prävention">
|
||||||
<tabs v-model="tabs.stammkontakt">
|
<prae :inner="props.data" />
|
||||||
<stamm v-show="tabs.stammkontakt.active === 'stamm'" :inner="inner"></stamm>
|
|
||||||
<kontakt v-show="tabs.stammkontakt.active === 'kontakt'" :inner="inner"></kontakt>
|
|
||||||
</tabs>
|
|
||||||
</ui-box>
|
</ui-box>
|
||||||
|
<ui-box heading="System">
|
||||||
|
<system :inner="props.data" />
|
||||||
|
</ui-box>
|
||||||
|
<ui-box class="col-span-full">
|
||||||
|
<ui-tabs v-model="tabs.membershipcourse.active" :entries="tabs.membershipcourse.entries" />
|
||||||
|
<memberships v-show="tabs.membershipcourse.active === 0" :value="props.data.memberships" />
|
||||||
|
<courses v-show="tabs.membershipcourse.active === 1" :value="props.data.courses" />
|
||||||
|
<payments v-show="tabs.membershipcourse.active === 2" :value="props.data.invoicePositions" />
|
||||||
|
<div v-show="tabs.membershipcourse.active === 3" class="h-full flex items-center justify-center text-gray-400 text-center">Keine Karte vorhanden</div>
|
||||||
|
</ui-box>
|
||||||
|
</section>
|
||||||
|
|
||||||
<ui-box container-class="" heading="Prävention" class="area-praev hidden xl:block">
|
<section class="mobile contents xl:hidden">
|
||||||
<prae :inner="inner"></prae>
|
<ui-box heading="Stammdaten"> <stamm :inner="props.data" /> </ui-box>
|
||||||
</ui-box>
|
<ui-box heading="Kontakt"> <kontakt :inner="props.data" /> </ui-box>
|
||||||
<ui-box heading="System" class="area-system hidden xl:block">
|
<ui-box heading="Prävention"> <prae :inner="props.data" /> </ui-box>
|
||||||
<system :inner="inner"></system>
|
<ui-box heading="System"> <system :inner="props.data" /> </ui-box>
|
||||||
</ui-box>
|
<ui-box heading="Mitgliedschaften"> <memberships :value="props.data.memberships" /> </ui-box>
|
||||||
<ui-box class="area-praesystem block xl:hidden">
|
<ui-box heading="Ausbildungen"> <courses :value="props.data.courses" /> </ui-box>
|
||||||
<tabs v-model="tabs.praesystem">
|
<ui-box heading="Zahlungen"> <payments :value="props.data.invoicePositions" /> </ui-box>
|
||||||
<prae v-show="tabs.praesystem.active === 'prae'" :inner="inner"></prae>
|
<ui-box heading="Karte"> <div class="h-full flex items-center justify-center text-gray-400 text-center">Keine Karte vorhanden</div> </ui-box>
|
||||||
<system v-show="tabs.praesystem.active === 'system'" :inner="inner"></system>
|
</section>
|
||||||
</tabs>
|
|
||||||
</ui-box>
|
|
||||||
|
|
||||||
<ui-box class="area-membershipcourse hidden xl:block">
|
|
||||||
<tabs v-model="tabs.membershipcourse">
|
|
||||||
<courses v-show="tabs.membershipcourse.active === 'course'" :value="inner.courses"></courses>
|
|
||||||
<memberships v-show="tabs.membershipcourse.active === 'membership'" :value="inner.memberships"> </memberships>
|
|
||||||
</tabs>
|
|
||||||
</ui-box>
|
|
||||||
<ui-box heading="Ausbildungen" class="area-courses xl:hidden">
|
|
||||||
<courses :value="inner.courses"></courses>
|
|
||||||
</ui-box>
|
|
||||||
<ui-box heading="Mitgliedschaften" class="area-memberships xl:hidden">
|
|
||||||
<memberships :value="inner.memberships"></memberships>
|
|
||||||
</ui-box>
|
|
||||||
|
|
||||||
<ui-box heading="Zahlungen" class="area-payments">
|
|
||||||
<payments :value="inner.invoicePositions"></payments>
|
|
||||||
</ui-box>
|
|
||||||
|
|
||||||
<ui-box heading="Karte" container-class="grow" class="area-map hidden xl:flex">
|
|
||||||
<div class="h-full flex items-center justify-center text-gray-400 text-center">Keine Karte vorhanden</div>
|
|
||||||
</ui-box>
|
|
||||||
</div>
|
</div>
|
||||||
</page-layout>
|
</page-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts" setup>
|
||||||
import {defineAsyncComponent} from 'vue';
|
import {defineAsyncComponent, ref} from 'vue';
|
||||||
|
|
||||||
export default {
|
const stamm = defineAsyncComponent(() => import('./boxes/Stamm.vue'));
|
||||||
props: {
|
const kontakt = defineAsyncComponent(() => import('./boxes/Kontakt.vue'));
|
||||||
data: {},
|
const prae = defineAsyncComponent(() => import('./boxes/Prae.vue'));
|
||||||
meta: {},
|
const courses = defineAsyncComponent(() => import('./boxes/Courses.vue'));
|
||||||
},
|
const system = defineAsyncComponent(() => import('./boxes/System.vue'));
|
||||||
data: function () {
|
const payments = defineAsyncComponent(() => import('./boxes/Payments.vue'));
|
||||||
return {
|
const memberships = defineAsyncComponent(() => import('./boxes/Memberships.vue'));
|
||||||
inner: {},
|
|
||||||
tabs: {
|
const tabs = ref({
|
||||||
stammkontakt: {
|
stammkontakt: {
|
||||||
children: {
|
active: 0,
|
||||||
stamm: 'Stammdaten',
|
entries: [{title: 'Stammdaten'}, {title: 'Kontakt'}],
|
||||||
kontakt: 'Kontakt',
|
|
||||||
},
|
|
||||||
active: 'stamm',
|
|
||||||
},
|
},
|
||||||
praesystem: {
|
praesystem: {
|
||||||
children: {
|
active: 0,
|
||||||
system: 'System',
|
entries: [{title: 'System'}, {title: 'Prävention'}],
|
||||||
prae: 'Prävention',
|
|
||||||
},
|
|
||||||
active: 'system',
|
|
||||||
},
|
},
|
||||||
membershipcourse: {
|
membershipcourse: {
|
||||||
children: {
|
active: 0,
|
||||||
membership: 'Mitgliedschaften',
|
entries: [{title: 'Mitgliedschaften'}, {title: 'Ausbildungen'}, {title: 'Zahlungen'}, {title: 'Karte'}],
|
||||||
course: 'Ausbildungen',
|
|
||||||
},
|
|
||||||
active: 'membership',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
});
|
||||||
|
|
||||||
methods: {},
|
const props = defineProps<{
|
||||||
|
data: object,
|
||||||
components: {
|
meta: object,
|
||||||
stamm: defineAsyncComponent(() => import('./boxes/Stamm.vue')),
|
}>();
|
||||||
kontakt: defineAsyncComponent(() => import('./boxes/Kontakt.vue')),
|
|
||||||
prae: defineAsyncComponent(() => import('./boxes/Prae.vue')),
|
|
||||||
courses: defineAsyncComponent(() => import('./boxes/Courses.vue')),
|
|
||||||
system: defineAsyncComponent(() => import('./boxes/System.vue')),
|
|
||||||
payments: defineAsyncComponent(() => import('./boxes/Payments.vue')),
|
|
||||||
memberships: defineAsyncComponent(() => import('./boxes/Memberships.vue')),
|
|
||||||
tabs: defineAsyncComponent(() => import('./Tabs.vue')),
|
|
||||||
},
|
|
||||||
|
|
||||||
created() {
|
|
||||||
this.inner = this.data;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.this-grid {
|
|
||||||
grid-template-areas:
|
|
||||||
'stammkontakt'
|
|
||||||
'praesystem'
|
|
||||||
'courses'
|
|
||||||
'memberships'
|
|
||||||
'payments';
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 1280px) {
|
|
||||||
.this-grid {
|
|
||||||
grid-template-areas:
|
|
||||||
'stamm kontakt praev system'
|
|
||||||
'membershipcourse membershipcourse membershipcourse membershipcourse'
|
|
||||||
'payments payments map map';
|
|
||||||
grid-template-columns: max-content max-content max-content 1fr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-stamm {
|
|
||||||
grid-area: stamm;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-kontakt {
|
|
||||||
grid-area: kontakt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-praev {
|
|
||||||
grid-area: praev;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-courses {
|
|
||||||
grid-area: courses;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-system {
|
|
||||||
grid-area: system;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-memberships {
|
|
||||||
grid-area: memberships;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-payments {
|
|
||||||
grid-area: payments;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-map {
|
|
||||||
grid-area: map;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-stammkontakt {
|
|
||||||
grid-area: stammkontakt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-membershipcourse {
|
|
||||||
grid-area: membershipcourse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.area-praesystem {
|
|
||||||
grid-area: praesystem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue