Skip to content

Commit 179fbfb

Browse files
authored
Merge pull request #1 from Promethys/2.x
2.x
2 parents 751fa08 + fdc9d7c commit 179fbfb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2271
-242
lines changed

README.md

Lines changed: 269 additions & 26 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "promethys/revive",
3+
"version": "2.1.0",
34
"description": "A 'RecycleBin' page where users can restore or delete permanently soft-deleted models.",
45
"keywords": [
56
"Promethys",
@@ -23,9 +24,9 @@
2324
],
2425
"require": {
2526
"php": "^8.2",
26-
"filament/filament": "^3.0",
27-
"filament/forms": "^3.0",
28-
"filament/tables": "^3.0",
27+
"filament/filament": "^4.0|^3.0",
28+
"filament/forms": "^4.0|^3.0",
29+
"filament/tables": "^4.0|^3.0",
2930
"illuminate/contracts": "^12.0|^11.0",
3031
"illuminate/database": "*",
3132
"illuminate/support": "*",
@@ -34,7 +35,7 @@
3435
"require-dev": {
3536
"laravel/pint": "^1.0",
3637
"nunomaduro/collision": "^8.1",
37-
"orchestra/testbench": "^8.0",
38+
"orchestra/testbench": "^10.0|^9.0|^8.0",
3839
"pestphp/pest": "^3.0",
3940
"pestphp/pest-plugin-arch": "^3.0",
4041
"pestphp/pest-plugin-laravel": "^3.0",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('recycle_bin_items', function (Blueprint $table) {
15+
$table->unsignedBigInteger('deleted_by')->nullable();
16+
$table->unsignedBigInteger('tenant_id')->nullable();
17+
18+
$table->index('deleted_by');
19+
$table->index('tenant_id');
20+
$table->index('deleted_at');
21+
22+
$table->unique(['model_type', 'model_id'], 'unique_model_in_recycle_bin');
23+
});
24+
}
25+
26+
/**
27+
* Reverse the migrations.
28+
*/
29+
public function down(): void
30+
{
31+
Schema::table('recycle_bin_items', function (Blueprint $table) {
32+
$table->dropUnique('unique_model_in_recycle_bin');
33+
34+
$table->dropIndex(['deleted_by']);
35+
$table->dropIndex(['tenant_id']);
36+
$table->dropIndex(['deleted_at']);
37+
38+
$table->dropColumn(['deleted_by', 'tenant_id']);
39+
});
40+
}
41+
};

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/imgs/preview.png

-68.6 KB
Loading

resources/lang/ar/translations.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,28 @@
2626
'failure_notification_title' => 'فشل في حذف النموذج نهائياً',
2727
],
2828
],
29+
30+
'bulk_actions' => [
31+
'restore' => [
32+
'success_notification_title' => '{1} تم استعادة النموذج بنجاح|[2,*] تم استعادة جميع :count النماذج بنجاح',
33+
'success_notification_body' => '{1} تم استعادة النموذج.|[2,*] تم استعادة جميع :count النماذج.',
34+
35+
'warning_notification_title' => 'اكتملت عملية الاستعادة جزئياً',
36+
'warning_notification_body' => 'تم استعادة :success من أصل :total نموذجاً. لا يمكن استعادة :failed نموذجاً.',
37+
38+
'failure_notification_title' => 'فشل الاستعادة',
39+
'failure_notification_body' => '{1} لا يمكن استعادة النموذج.|[2,*] لا يمكن استعادة أي من النماذج :count.',
40+
],
41+
'force_delete' => [
42+
'success_notification_title' => '{1} تم حذف النموذج نهائياً|[2,*] تم حذف جميع :count النماذج نهائياً',
43+
'success_notification_body' => '{1} تم حذف النموذج نهائياً.|[2,*] تم حذف جميع :count النماذج نهائياً.',
44+
45+
'warning_notification_title' => 'اكتملت عملية الحذف جزئياً',
46+
'warning_notification_body' => 'تم حذف نهائي لـ :success من أصل :total نموذجاً. لا يمكن حذف :failed نموذجاً.',
47+
48+
'failure_notification_title' => 'فشل الحذف',
49+
'failure_notification_body' => '{1} لا يمكن حذف النموذج نهائياً.|[2,*] لا يمكن حذف أي من النماذج :count نهائياً.',
50+
],
51+
],
2952
],
3053
];

resources/lang/az/translations.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,28 @@
2626
'failure_notification_title' => 'Modeli həmişəlik silmək alınmadı',
2727
],
2828
],
29+
30+
'bulk_actions' => [
31+
'restore' => [
32+
'success_notification_title' => '{1} Model uğurla bərpa edildi|[2,*] Bütün :count modellər uğurla bərpa edildi',
33+
'success_notification_body' => '{1} Model bərpa edildi.|[2,*] Bütün :count modellər bərpa edildi.',
34+
35+
'warning_notification_title' => 'Bərpa qismən tamamlandı',
36+
'warning_notification_body' => ':total modeldən :success bərpa edildi. :failed modeli bərpa etmək mümkün olmadı.',
37+
38+
'failure_notification_title' => 'Bərpa uğursuz oldu',
39+
'failure_notification_body' => '{1} Model bərpa edilə bilmədi.|[2,*] Heç bir :count model bərpa edilə bilmədi.',
40+
],
41+
'force_delete' => [
42+
'success_notification_title' => '{1} Model daimi silindi|[2,*] Bütün :count modellər daimi silindi',
43+
'success_notification_body' => '{1} Model daimi silindi.|[2,*] Bütün :count modellər daimi silindi.',
44+
45+
'warning_notification_title' => 'Silinmə qismən tamamlandı',
46+
'warning_notification_body' => 'Daimi silinmə :success modeldən :total modelə. :failed modeli silmək mümkün olmadı.',
47+
48+
'failure_notification_title' => 'Silinmə uğursuz oldu',
49+
'failure_notification_body' => '{1} Model daimi silinə bilmədi.|[2,*] Heç bir :count model daimi silinə bilmədi.',
50+
],
51+
],
2952
],
3053
];

resources/lang/bg/translations.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@
2525
'success_notification_title' => 'Моделът е изтрит завинаги',
2626
'failure_notification_title' => 'Неуспешно окончателно изтриване на модела',
2727
],
28+
'bulk_actions' => [
29+
'restore' => [
30+
'success_notification_title' => '{1} Моделът бе възстановен успешно|[2,*] Всички :count модела бяха възстановени успешно',
31+
'success_notification_body' => '{1} Моделът е възстановен.|[2,*] Всички :count модела бяха възстановени.',
32+
33+
'warning_notification_title' => 'Възстановяването е частично завършено',
34+
'warning_notification_body' => 'Възстановени са :success от :total модела. :failed модела не можа да бъде възстановен.',
35+
36+
'failure_notification_title' => 'Възстановяването не бе успешно',
37+
'failure_notification_body' => '{1} Моделът не можа да бъде възстановен.|[2,*] Нито един от :count модела не можа да бъде възстановен.',
38+
],
39+
'force_delete' => [
40+
'success_notification_title' => '{1} Моделът бе окончателно изтрит|[2,*] Всички :count модела бяха окончателно изтрити',
41+
'success_notification_body' => '{1} Моделът е окончателно изтрит.|[2,*] Всички :count модела бяха окончателно изтрити.',
42+
43+
'warning_notification_title' => 'Изтриването е частично завършено',
44+
'warning_notification_body' => 'Окончателно изтрити :success от :total модела. :failed модела не можаха да бъдат изтрити.',
45+
46+
'failure_notification_title' => 'Изтриването не бе успешно',
47+
'failure_notification_body' => '{1} Моделът не можа да бъде окончателно изтрит.|[2,*] Нито един от :count модела не можа да бъде окончателно изтрит.',
48+
],
49+
],
2850
],
2951
],
3052
];

resources/lang/bn/translations.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,28 @@
2626
'failure_notification_title' => 'মডেল স্থায়ীভাবে মুছে ফেলতে ব্যর্থ',
2727
],
2828
],
29+
30+
'bulk_actions' => [
31+
'restore' => [
32+
'success_notification_title' => '{1} মডেল সফলভাবে পুনরুদ্ধার করা হয়েছে|[2,*] সকল :count মডেল সফলভাবে পুনরুদ্ধার করা হয়েছে',
33+
'success_notification_body' => '{1} মডেলটি পুনরুদ্ধার করা হয়েছে।|[2,*] সকল :count মডেল পুনরুদ্ধার করা হয়েছে।',
34+
35+
'warning_notification_title' => 'পুনরুদ্ধার আংশিকভাবে সম্পন্ন হয়েছে',
36+
'warning_notification_body' => ':total মডেল থেকে :success পুনরুদ্ধার করা হয়েছে। :failed মডেল পুনরুদ্ধার করা যায়নি।',
37+
38+
'failure_notification_title' => 'পুনরুদ্ধার ব্যর্থ',
39+
'failure_notification_body' => '{1} মডেলটি পুনরুদ্ধার করা যায়নি।|[2,*] :count কোন মডেলই পুনরুদ্ধার করা যায়নি।',
40+
],
41+
'force_delete' => [
42+
'success_notification_title' => '{1} মডেল স্থায়ীভাবে মোছা হয়েছে|[2,*] সকল :count মডেল স্থায়ীভাবে মোছা হয়েছে',
43+
'success_notification_body' => '{1} মডেলটি স্থায়ীভাবে মোছা হয়েছে।|[2,*] সকল :count মডেল স্থায়ীভাবে মোছা হয়েছে।',
44+
45+
'warning_notification_title' => 'মুছা আংশিকভাবে সম্পন্ন হয়েছে',
46+
'warning_notification_body' => ':total মডেল থেকে :success স্থায়ীভাবে মোছা হয়েছে। :failed মডেল মোছা যায়নি।',
47+
48+
'failure_notification_title' => 'মুছা ব্যর্থ',
49+
'failure_notification_body' => '{1} মডেলটি স্থায়ীভাবে মোছা যায়নি।|[2,*] কোনো একটি :count মডেলই স্থায়ীভাবে মোছা যায়নি।',
50+
],
51+
],
2952
],
3053
];

resources/lang/bs/translations.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,28 @@
2626
'failure_notification_title' => 'Neuspjeh pri trajnom brisanju modela',
2727
],
2828
],
29+
30+
'bulk_actions' => [
31+
'restore' => [
32+
'success_notification_title' => '{1} Model je uspješno vraćen|[2,*] Svi :count modeli su uspješno vraćeni',
33+
'success_notification_body' => '{1} Model je vraćen.|[2,*] Svi :count modeli su vraćeni.',
34+
35+
'warning_notification_title' => 'Vraćanje djelimično završeno',
36+
'warning_notification_body' => 'Vraćeno je :success od :total modela. :failed modela nije moglo biti vraćeno.',
37+
38+
'failure_notification_title' => 'Vraćanje nije uspjelo',
39+
'failure_notification_body' => '{1} Model nije mogao biti vraćen.|[2,*] Nijedan od :count modela nije mogao biti vraćen.',
40+
],
41+
'force_delete' => [
42+
'success_notification_title' => '{1} Model je trajno obrisan|[2,*] Svi :count modeli su trajno obrisani',
43+
'success_notification_body' => '{1} Model je trajno obrisan.|[2,*] Svi :count modeli su trajno obrisani.',
44+
45+
'warning_notification_title' => 'Brisanje djelimično završeno',
46+
'warning_notification_body' => 'Trajno obrisano :success od :total modela. :failed modela nije moglo biti obrisano.',
47+
48+
'failure_notification_title' => 'Brisanje nije uspjelo',
49+
'failure_notification_body' => '{1} Model nije mogao biti trajno obrisan.|[2,*] Nijedan od :count modela nije mogao biti trajno obrisan.',
50+
],
51+
],
2952
],
3053
];

0 commit comments

Comments
 (0)