Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
"datalinx/php-utils": "^2.5",
"eclipsephp/common": "dev-main",
"filament/filament": "^3.3",
"filament/spatie-laravel-translatable-plugin": "^3.3",
"laravel/framework": "^11.0|^12.0",
"spatie/laravel-package-tools": "^1.19"
"spatie/laravel-package-tools": "^1.19",
"spatie/laravel-translatable": "^6.11"
},
"require-dev": {
"laravel/pint": "^1.21",
Expand Down
25 changes: 25 additions & 0 deletions database/factories/TariffCodeFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Eclipse\World\Factories;

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

class TariffCodeFactory extends Factory
{
protected $model = TariffCode::class;

public function definition(): array
{
return [
'year' => (int) date('Y'),
'code' => $this->faker->unique()->numerify('####'),
'name' => [
'en' => $this->faker->words(3, true),
],
'measure_unit' => [
'en' => $this->faker->randomElement(['pcs', 'kg', 'l', 'm']),
],
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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_tariff_codes', function (Blueprint $table) {
$table->id();
$table->smallInteger('year')->index();
$table->string('code', 20)->index();
$table->json('name');
$table->json('measure_unit')->nullable();
$table->timestamps();
$table->softDeletes();

$table->unique(['year', 'code']);
});
}

public function down(): void
{
Schema::dropIfExists('world_tariff_codes');
}
};
84 changes: 84 additions & 0 deletions resources/lang/en/tariff-codes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

return [

'nav_label' => 'Tariff Codes',
'breadcrumb' => 'Tariff Codes',
'plural' => 'Tariff Codes',

'table' => [
'year' => [
'label' => 'Year',
],
'code' => [
'label' => 'Code',
],
'name' => [
'label' => 'Name',
],
],

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

'form' => [
'year' => [
'label' => 'Year',
],
'code' => [
'label' => 'Code',
],
'name' => [
'label' => 'Name',
],
'measure_unit' => [
'label' => 'Measure unit',
],
],

'validation' => [
'code' => [
'unique' => 'A tariff code with this code already exists.',
],
],

'import' => [
'action_label' => 'Import Tariff Codes',
'modal_heading' => 'Import CN tariff codes',
'locales_label' => 'Locales',
'job_name' => 'Import Tariff Codes',
],

'notifications' => [
'queued' => [
'title' => 'Tariff Codes Import queued',
],
'completed' => [
'title' => 'Tariff Codes Import completed',
],
'failed' => [
'title' => 'Tariff Codes Import failed',
],
],
];
84 changes: 84 additions & 0 deletions resources/lang/hr/tariff-codes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

return [

'nav_label' => 'Carinske šifre',
'breadcrumb' => 'Carinske šifre',
'plural' => 'Carinske šifre',

'table' => [
'year' => [
'label' => 'Godina',
],
'code' => [
'label' => 'Šifra',
],
'name' => [
'label' => 'Naziv',
],
],

'actions' => [
'create' => [
'label' => 'Nova carinska šifra',
'heading' => 'Nova carinska šifra',
],
'edit' => [
'label' => 'Uredi',
'heading' => 'Uredi carinsku šifru',
],
'delete' => [
'label' => 'Obriši',
'heading' => 'Obriši carinsku šifru',
],
'restore' => [
'label' => 'Vrati',
'heading' => 'Vrati carinsku šifru',
],
'force_delete' => [
'label' => 'Trajno brisanje',
'heading' => 'Trajno brisanje carinske šifre',
'description' => 'Jeste li sigurni da želite obrisati carinsku šifru :name? Ova radnja je nepovratna.',
],
],

'form' => [
'year' => [
'label' => 'Godina',
],
'code' => [
'label' => 'Šifra',
],
'name' => [
'label' => 'Naziv',
],
'measure_unit' => [
'label' => 'Mjerna jedinica',
],
],

'validation' => [
'code' => [
'unique' => 'Carinska šifra s ovom šifrom već postoji.',
],
],

'import' => [
'action_label' => 'Uvoz carinskih šifara',
'modal_heading' => 'Uvoz CN carinskih šifara',
'locales_label' => 'Jezici',
'job_name' => 'Uvoz carinskih šifara',
],

'notifications' => [
'queued' => [
'title' => 'Uvoz carinskih šifara na čekanju',
],
'completed' => [
'title' => 'Uvoz carinskih šifara dovršen',
],
'failed' => [
'title' => 'Uvoz carinskih šifara nije uspio',
],
],
];
84 changes: 84 additions & 0 deletions resources/lang/sl/tariff-codes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

return [

'nav_label' => 'Carinske oznake',
'breadcrumb' => 'Carinske oznake',
'plural' => 'Carinske oznake',

'table' => [
'year' => [
'label' => 'Leto',
],
'code' => [
'label' => 'Koda',
],
'name' => [
'label' => 'Naziv',
],
],

'actions' => [
'create' => [
'label' => 'Nova carinska oznaka',
'heading' => 'Nova carinska oznaka',
],
'edit' => [
'label' => 'Uredi',
'heading' => 'Uredi carinsko oznako',
],
'delete' => [
'label' => 'Izbriši',
'heading' => 'Izbriši carinsko oznako',
],
'restore' => [
'label' => 'Obnovi',
'heading' => 'Obnovi carinsko oznako',
],
'force_delete' => [
'label' => 'Trajni izbris',
'heading' => 'Trajni izbris carinske oznake',
'description' => 'Ali ste prepričani, da želite izbrisati carinsko oznako :name? Tega dejanja ni mogoče razveljaviti.',
],
],

'form' => [
'year' => [
'label' => 'Leto',
],
'code' => [
'label' => 'Koda',
],
'name' => [
'label' => 'Naziv',
],
'measure_unit' => [
'label' => 'Merska enota',
],
],

'validation' => [
'code' => [
'unique' => 'Carinska oznaka s to kodo že obstaja.',
],
],

'import' => [
'action_label' => 'Uvozi carinske oznake',
'modal_heading' => 'Uvoz CN carinskih oznak',
'locales_label' => 'Jeziki',
'job_name' => 'Uvoz carinskih oznak',
],

'notifications' => [
'queued' => [
'title' => 'Uvoz carinskih oznak v čakalni vrsti',
],
'completed' => [
'title' => 'Uvoz carinskih oznak zaključen',
],
'failed' => [
'title' => 'Uvoz carinskih oznak ni uspel',
],
],
];
Loading