Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation bugs #54

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions database/migrations/create_translations_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Outhebox\TranslationsUI\Models\Language;

return new class extends Migration
{
public function up(): void
{
Schema::create('ltu_translations', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Language::class)->constrained('ltu_languages')->cascadeOnDelete();
$table->foreignId('language_id');
$table->boolean('source')->default(false);
$table->timestamps();
});
Expand Down
4 changes: 0 additions & 4 deletions resources/scripts/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ export type SourcePhrase = {
updated_at: string
state: boolean
note: string
status: Array<{
value: string
label: string
}>
value_html: Array<{
parameter: boolean
value: string
Expand Down
1 change: 0 additions & 1 deletion resources/views/pages/auth/login.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup lang="ts">
defineProps<{
canResetPassword?: boolean
status?: string
}>()

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/ContributorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
fn () => Contributor::create([
'name' => $name,
'email' => $email,
'role' => RoleEnum::from($role),
'role' => $role ?? RoleEnum::owner->value,
'password' => Hash::make($password),
]),
'Creating contributor...'
Expand Down
4 changes: 0 additions & 4 deletions src/Http/Resources/PhraseResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ public function toArray(Request $request): array
'updated_at' => $this->updated_at,
'state' => (bool) $this->value,
'note' => $this->note,
'status' => [
'value' => $this->status->value,
'label' => $this->status->label(),
],
'value_html' => $this->splitParameters(),
'translation_id' => $this->translation_id,
'translation_file_id' => $this->translation_file_id,
Expand Down
2 changes: 0 additions & 2 deletions src/Models/Phrase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Collection;
use Outhebox\TranslationsUI\Enums\StatusEnum;
use Outhebox\TranslationsUI\Traits\HasDatabaseConnection;
use Outhebox\TranslationsUI\Traits\HasUuid;

Expand All @@ -22,7 +21,6 @@ class Phrase extends Model

protected $casts = [
'parameters' => 'array',
'status' => StatusEnum::class,
];

protected $with = [
Expand Down