feat: Translate various UI texts to Indonesian, enhance CreateAction modals with custom labels and "save and add more" options, and disable autocomplete for egg price input.
This commit is contained in:
parent
c1201cd8c2
commit
1a345f2759
@ -5,6 +5,7 @@
|
||||
use App\Filament\Resources\DelayedGoods\DelayedGoodResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
use Filament\Support\Enums\Width;
|
||||
|
||||
class ListDelayedGoods extends ManageRecords
|
||||
{
|
||||
@ -16,7 +17,15 @@ protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()
|
||||
->label('Tambah'),
|
||||
->label('Tambah')
|
||||
->modalHeading('Tambah Barang Tertunda')
|
||||
->modalSubmitActionLabel('Simpan')
|
||||
->modalCancelActionLabel('Batal')
|
||||
->extraModalFooterActions(fn (CreateAction $action): array => [
|
||||
$action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
|
||||
->label('Simpan dan Tambah Lagi'),
|
||||
])
|
||||
->modalWidth(Width::FourExtraLarge),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ class OrderResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::ShoppingCart;
|
||||
|
||||
protected static ?string $navigationLabel = 'Order';
|
||||
protected static ?string $navigationLabel = 'Pesanan';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
|
||||
@ -5,18 +5,27 @@
|
||||
use App\Filament\Resources\Manage\Orders\OrderResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
use Filament\Support\Enums\Width;
|
||||
|
||||
class ManageOrders extends ManageRecords
|
||||
{
|
||||
protected static string $resource = OrderResource::class;
|
||||
|
||||
protected static ?string $title = 'Order';
|
||||
protected static ?string $title = 'Pesanan';
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()
|
||||
->label('Tambah'),
|
||||
->label('Tambah')
|
||||
->modalHeading('Tambah Pesanan')
|
||||
->modalSubmitActionLabel('Simpan')
|
||||
->modalCancelActionLabel('Batal')
|
||||
->extraModalFooterActions(fn (CreateAction $action): array => [
|
||||
$action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
|
||||
->label('Simpan dan Tambah Lagi'),
|
||||
])
|
||||
->modalWidth(Width::FourExtraLarge),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ public static function form(Schema $schema): Schema
|
||||
TextInput::make('price')
|
||||
->label('Harga')
|
||||
->placeholder('0')
|
||||
->autocomplete(false)
|
||||
->required()
|
||||
->currencyMask(thousandSeparator: '.', decimalSeparator: ',', precision: 0)
|
||||
->prefix('Rp')
|
||||
|
||||
@ -30,13 +30,13 @@ protected function getStats(): array
|
||||
->descriptionIcon('heroicon-m-circle-stack')
|
||||
->color('warning'),
|
||||
|
||||
Stat::make('Order', number_format(Order::count(), 0, ',', '.').' Order')
|
||||
->description('Jumlah order yang dibuat.')
|
||||
Stat::make('Order', number_format(Order::count(), 0, ',', '.').' Pesanan')
|
||||
->description('Jumlah pesanan yang dibuat.')
|
||||
->descriptionIcon('heroicon-m-shopping-cart')
|
||||
->color('info'),
|
||||
|
||||
Stat::make('Pendapatan', 'Rp '.number_format(Order::sum('total_amount'), 0, ',', '.'))
|
||||
->description('Total pendapatan dari order.')
|
||||
->description('Total pendapatan dari pesanan.')
|
||||
->descriptionIcon('heroicon-m-banknotes')
|
||||
->color('success'),
|
||||
|
||||
@ -60,7 +60,7 @@ protected function getStats(): array
|
||||
->descriptionIcon('heroicon-m-shopping-bag')
|
||||
->color('info'),
|
||||
|
||||
Stat::make('Laba Kotor (Estimasi)', 'Rp '.number_format(Order::sum('total_amount') - (Expense::sum('amount') + FeedPurchase::sum('total_price')), 0, ',', '.'))
|
||||
Stat::make('Laba Kotor', 'Rp '.number_format(Order::sum('total_amount') - (Expense::sum('amount') + FeedPurchase::sum('total_price')), 0, ',', '.'))
|
||||
->description('Pendapatan - (Pengeluaran + Pakan).')
|
||||
->descriptionIcon('heroicon-m-presentation-chart-line')
|
||||
->color('success'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user