fix: rename song_group_id to label_id in Vue, add data-testid to MacroIcon, fix Pint style
This commit is contained in:
parent
6d83b5f38c
commit
41d4bfe2b7
|
|
@ -27,7 +27,7 @@ public function importPro(Request $request): JsonResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$service = new ProImportService();
|
$service = new ProImportService;
|
||||||
$songs = $service->import($file);
|
$songs = $service->import($file);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ class ProExportService
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly MacroResolutionService $macroResolutionService,
|
private readonly MacroResolutionService $macroResolutionService,
|
||||||
) {
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
public function generateProFile(Song $song, ?Service $service = null): string
|
public function generateProFile(Song $song, ?Service $service = null): string
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('labels', function (Blueprint $table) {
|
Schema::create('labels', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('macros', function (Blueprint $table) {
|
Schema::create('macros', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('macro_assignments', function (Blueprint $table) {
|
Schema::create('macro_assignments', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::create('service_macro_overrides', function (Blueprint $table) {
|
Schema::create('service_macro_overrides', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
if (! Schema::hasTable('song_groups')) {
|
if (! Schema::hasTable('song_groups')) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::table('song_slides', function (Blueprint $table) {
|
Schema::table('song_slides', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
return new class () extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
$name = DB::table('settings')->where('key', 'macro_name')->value('value');
|
$name = DB::table('settings')->where('key', 'macro_name')->value('value');
|
||||||
|
|
@ -66,7 +67,5 @@ public function up(): void
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(): void
|
public function down(): void {}
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ defineEmits(['click'])
|
||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
v-if="count > 0"
|
v-if="count > 0"
|
||||||
|
data-testid="macro-icon"
|
||||||
class="relative flex items-center justify-center rounded-lg bg-amber-100 px-2 py-1 text-xs font-medium text-amber-700 transition-colors hover:bg-amber-200"
|
class="relative flex items-center justify-center rounded-lg bg-amber-100 px-2 py-1 text-xs font-medium text-amber-700 transition-colors hover:bg-amber-200"
|
||||||
:aria-label="`${count} Makro-Zuweisungen`"
|
:aria-label="`${count} Makro-Zuweisungen`"
|
||||||
@click="$emit('click')"
|
@click="$emit('click')"
|
||||||
|
|
|
||||||
|
|
@ -150,10 +150,10 @@ const arrangements = computed(() => {
|
||||||
name: arr.name,
|
name: arr.name,
|
||||||
is_default: arr.is_default,
|
is_default: arr.is_default,
|
||||||
groups: arr.arrangement_groups.map((ag) => {
|
groups: arr.arrangement_groups.map((ag) => {
|
||||||
const group = songData.value.groups.find((g) => g.id === ag.song_group_id)
|
const group = songData.value.groups.find((g) => g.id === ag.label_id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: ag.song_group_id,
|
id: ag.label_id,
|
||||||
name: group?.name ?? 'Unbekannt',
|
name: group?.name ?? 'Unbekannt',
|
||||||
color: group?.color ?? '#6b7280',
|
color: group?.color ?? '#6b7280',
|
||||||
order: ag.order,
|
order: ag.order,
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,9 @@ function getArrangements(item) {
|
||||||
name: arr.name,
|
name: arr.name,
|
||||||
is_default: arr.is_default,
|
is_default: arr.is_default,
|
||||||
groups: (arr.arrangement_groups ?? []).map((ag) => {
|
groups: (arr.arrangement_groups ?? []).map((ag) => {
|
||||||
const group = song.groups?.find((g) => g.id === ag.song_group_id) ?? ag.group ?? {}
|
const group = song.groups?.find((g) => g.id === ag.label_id) ?? ag.group ?? {}
|
||||||
return {
|
return {
|
||||||
id: ag.song_group_id ?? group.id,
|
id: ag.label_id ?? group.id,
|
||||||
name: group.name ?? 'Unbekannt',
|
name: group.name ?? 'Unbekannt',
|
||||||
color: group.color ?? '#6b7280',
|
color: group.color ?? '#6b7280',
|
||||||
order: ag.order,
|
order: ag.order,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue