Skip to content
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
30 changes: 30 additions & 0 deletions database/factories/CurrencyFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Eclipse\World\Factories;

use Eclipse\World\Models\Currency;
use Illuminate\Database\Eloquent\Factories\Factory;

class CurrencyFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Currency::class;

/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'id' => fake()->lexify('???'),
'name' => fake()->currencyCode(),
'is_active' => fake()->boolean(80), // 80% chance of being active
];
}
}
24 changes: 24 additions & 0 deletions database/migrations/2025_07_29_133427_create_currencies_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

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

return new class extends Migration
{
public function up(): void
{
Schema::create('world_currencies', function (Blueprint $table) {
$table->string('id', 3)->primary();
$table->string('name');
$table->string('is_active');
$table->timestamps();
$table->softDeletes();
});
}

public function down(): void
{
Schema::dropIfExists('world_currencies');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

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

return new class extends Migration
{
public function up(): void
{
Schema::table('world_currencies', function (Blueprint $table) {
$table->boolean('is_active')->default(false)->change();
});
}

public function down(): void
{
Schema::table('world_currencies', function (Blueprint $table) {
$table->string('is_active')->change();
});
}
};
75 changes: 75 additions & 0 deletions resources/lang/en/currencies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

return [

'nav_label' => 'Currencies',
'breadcrumb' => 'Currencies',
'plural' => 'Currencies',

'table' => [
'id' => [
'label' => 'Code',
],
'name' => [
'label' => 'Name',
],
'is_active' => [
'label' => 'Active',
],
],

'actions' => [
'create' => [
'label' => 'New currency',
'heading' => 'New Currency',
],
'edit' => [
'label' => 'Edit',
'heading' => 'Edit Currency',
],
'delete' => [
'label' => 'Delete',
'heading' => 'Delete Currency',
],
'restore' => [
'label' => 'Restore',
'heading' => 'Restore Currency',
],
'force_delete' => [
'label' => 'Permanent delete',
'heading' => 'Permanent Deletion of Currency',
'description' => 'Are you sure you want to delete the currency :name? This action cannot be undone.',
],
],

'form' => [
'id' => [
'label' => 'Code',
'helper' => 'Three-letter currency code (ISO 4217)',
],
'name' => [
'label' => 'Name',
],
'is_active' => [
'label' => 'Active',
],
],

'import' => [
'action_label' => 'Import Currencies',
'modal_heading' => 'Import Currencies',
'success_title' => 'Import Currencies',
'success_message' => 'The import currencies job has been queued.',
],

'notifications' => [
'success' => [
'title' => 'Currencies Import Completed',
'message' => 'All currencies have been successfully imported and updated.',
],
'failed' => [
'title' => 'Currencies Import Failed',
'message' => 'Failed to import currencies data.',
],
],
];
75 changes: 75 additions & 0 deletions resources/lang/hr/currencies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

return [

'nav_label' => 'Valute',
'breadcrumb' => 'Valute',
'plural' => 'Valute',

'table' => [
'id' => [
'label' => 'Kod',
],
'name' => [
'label' => 'Naziv',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'actions' => [
'create' => [
'label' => 'Nova valuta',
'heading' => 'Nova valuta',
],
'edit' => [
'label' => 'Uredi',
'heading' => 'Uredi valutu',
],
'delete' => [
'label' => 'Obriši',
'heading' => 'Obriši valutu',
],
'restore' => [
'label' => 'Vrati',
'heading' => 'Vrati valutu',
],
'force_delete' => [
'label' => 'Trajno obriši',
'heading' => 'Trajno brisanje valute',
'description' => 'Jeste li sigurni da želite obrisati valutu :name? Ova radnja se ne može poništiti.',
],
],

'form' => [
'id' => [
'label' => 'Kod',
'helper' => 'Troslovni kod valute (ISO 4217)',
],
'name' => [
'label' => 'Naziv',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'import' => [
'action_label' => 'Uvezi valute',
'modal_heading' => 'Uvezi valute',
'success_title' => 'Uvezi valute',
'success_message' => 'Posao uvoza valuta je dodan u red za izvršavanje.',
],

'notifications' => [
'success' => [
'title' => 'Uvoz valuta je završen',
'message' => 'Sve valute su uspješno uvezene i ažurirane.',
],
'failed' => [
'title' => 'Uvoz valuta nije uspješan',
'message' => 'Uvoz podataka o valutama nije uspješan.',
],
],
];
75 changes: 75 additions & 0 deletions resources/lang/sl/currencies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

return [

'nav_label' => 'Valute',
'breadcrumb' => 'Valute',
'plural' => 'Valute',

'table' => [
'id' => [
'label' => 'Koda',
],
'name' => [
'label' => 'Ime',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'actions' => [
'create' => [
'label' => 'Nova valuta',
'heading' => 'Nova valuta',
],
'edit' => [
'label' => 'Uredi',
'heading' => 'Uredi valuto',
],
'delete' => [
'label' => 'Izbriši',
'heading' => 'Izbriši valuto',
],
'restore' => [
'label' => 'Obnovi',
'heading' => 'Obnovi valuto',
],
'force_delete' => [
'label' => 'Trajno izbriši',
'heading' => 'Trajno brisanje valute',
'description' => 'Ali ste prepričani, da želite izbrisati valuto :name? Tega dejanja ni mogoče razveljaviti.',
],
],

'form' => [
'id' => [
'label' => 'Koda',
'helper' => 'Tritrkovna koda valute (ISO 4217)',
],
'name' => [
'label' => 'Ime',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'import' => [
'action_label' => 'Uvozi valute',
'modal_heading' => 'Uvozi valute',
'success_title' => 'Uvozi valute',
'success_message' => 'Opravilo uvoza valut je bilo dodano v čakalno vrsto.',
],

'notifications' => [
'success' => [
'title' => 'Uvoz valut je končan',
'message' => 'Vse valute so bile uspešno uvožene in posodobljene.',
],
'failed' => [
'title' => 'Uvoz valut ni uspel',
'message' => 'Uvoz podatkov o valutah ni uspel.',
],
],
];
75 changes: 75 additions & 0 deletions resources/lang/sr/currencies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

return [

'nav_label' => 'Valute',
'breadcrumb' => 'Valute',
'plural' => 'Valute',

'table' => [
'id' => [
'label' => 'Kod',
],
'name' => [
'label' => 'Naziv',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'actions' => [
'create' => [
'label' => 'Nova valuta',
'heading' => 'Nova valuta',
],
'edit' => [
'label' => 'Uredi',
'heading' => 'Uređivanje valute',
],
'delete' => [
'label' => 'Izbriši',
'heading' => 'Brisanje valute',
],
'restore' => [
'label' => 'Obnovi',
'heading' => 'Obnavljanje valute',
],
'force_delete' => [
'label' => 'Trajno izbriši',
'heading' => 'Trajno brisanje valute',
'description' => 'Da li ste sigurni da želite izbrisati valutu :name? Zapis više neće biti moguće obnoviti.',
],
],

'form' => [
'id' => [
'label' => 'Kod',
'helper' => 'Troslovni kod valute (ISO 4217)',
],
'name' => [
'label' => 'Naziv',
],
'is_active' => [
'label' => 'Aktivna',
],
],

'import' => [
'action_label' => 'Uvezi valute',
'modal_heading' => 'Uvoz valuta',
'success_title' => 'Uvoz valuta',
'success_message' => 'Zadatak za uvoz valuta je dodat u red čekanja.',
],

'notifications' => [
'success' => [
'title' => 'Uvoz valuta završen',
'message' => 'Sve valute su uspešno uvežene i ažurirane.',
],
'failed' => [
'title' => 'Uvoz valuta neuspešan',
'message' => 'Neuspešan uvoz podataka valuta.',
],
],
];
Loading