feat: update seeder with real YouTube video URLs and update technical blueprint

This commit is contained in:
2026-01-23 18:07:40 +07:00
parent 29ff8992b9
commit 82fe5f8a79
47 changed files with 257 additions and 1811 deletions

View File

@@ -2,8 +2,11 @@
namespace App\Filament\Admin\Resources\Vocabularies\Schemas;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
class VocabularyForm
@@ -12,20 +15,63 @@ class VocabularyForm
{
return $schema
->components([
TextInput::make('word')
->required(),
TextInput::make('reading'),
TextInput::make('romaji'),
TextInput::make('meaning_en'),
TextInput::make('meaning_id'),
TextInput::make('level_id'),
TextInput::make('audio_url')
->url(),
TextInput::make('type'),
Textarea::make('stroke_order_svg')
->columnSpanFull(),
Textarea::make('example_sentences')
->columnSpanFull(),
Section::make('Core Info')
->schema([
TextInput::make('word')
->label('Word (Kanji/Kana)')
->required()
->maxLength(255),
TextInput::make('reading')
->label('Reading (Kana)')
->required()
->maxLength(255),
TextInput::make('romaji')
->maxLength(255),
TextInput::make('meaning_id')
->label('Meaning (Bahasa Indonesia)')
->required()
->maxLength(255),
TextInput::make('meaning_en')
->label('Meaning (English)')
->required()
->maxLength(255),
])->columns(2),
Section::make('Metadata & Media')
->schema([
Select::make('level_id')
->label('JLPT Level')
->relationship('level', 'code')
->searchable()
->preload()
->required(),
Select::make('type')
->options([
'noun' => 'Noun',
'verb' => 'Verb',
'adjective' => 'Adjective',
'adverb' => 'Adverb',
'particle' => 'Particle',
'expression' => 'Expression',
])
->required(),
FileUpload::make('audio_url')
->label('Pronunciation Audio')
->disk('r2')
->directory('audio/vocab')
->visibility('public')
->acceptedFileTypes(['audio/mpeg', 'audio/wav', 'audio/ogg']),
])->columns(2),
Section::make('Advanced')
->schema([
Textarea::make('stroke_order_svg')
->label('Stroke Order SVG (JSON)')
->columnSpanFull(),
Textarea::make('example_sentences')
->label('Example Sentences (JSON)')
->columnSpanFull(),
])->collapsed(),
]);
}
}