Skip to content

Commit

Permalink
add hymnology to song lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
thes01 committed Nov 25, 2023
1 parent 3f1b722 commit 228a947
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/SongLyric.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class SongLyric extends Model
'is_sealed',
'revision_n_tags',
'revision_n_authors',
'revision_n_songbook_records'
'revision_n_songbook_records',
'hymnology'
];

private static $lang_string_values = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('song_lyrics', function (Blueprint $table) {
$table->string('hymnology')->default('');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('song_lyrics', function (Blueprint $table) {
$table->dropColumn('hymnology');
});
}
};
2 changes: 2 additions & 0 deletions graphql/song_lyric.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ type SongLyric {
admin_note: String @guard
is_sealed: Boolean
base_key: SheetMusicKey @rename(attribute: "lilypond_key_major")
hymnology: String
}

enum SongType {
Expand Down Expand Up @@ -289,6 +290,7 @@ input UpdateSongLyricInput {
bible_refs_src: String
admin_note: String
is_sealed: Boolean
hymnology: String
}

input SyncOfficialTagsRelation {
Expand Down
2 changes: 2 additions & 0 deletions resources/assets/js/admin/models/SongLyric.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const fragment = gql`
admin_note
is_sealed
hymnology
}
${lilypond_parts_sheet_music_fragment}
`;
Expand Down Expand Up @@ -322,6 +323,7 @@ export default {
admin_note: vueModel.admin_note,
licence_type_cc: vueModel.licence_type_cc,
is_sealed: vueModel.is_sealed,
hymnology: vueModel.hymnology,
// a pivot mutator
authors: {
sync: vueModel.authors_pivot
Expand Down
8 changes: 8 additions & 0 deletions resources/assets/js/admin/pages/edit/SongLyricEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@
</v-flex>
</v-layout>

<v-flex grow>
<v-textarea
label="Hymnologie"
v-model="model.hymnology"
rows="1"
></v-textarea>
</v-flex>

<v-card class="mb-4 px-4">
<v-card-title class="p-0">
<h3>Autoři<span v-if="is_arrangement_layout"> aranže</span>
Expand Down

0 comments on commit 228a947

Please sign in to comment.